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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lyzustc/Reinforcement_Learning | 15,710,990,387,286 | 144ad2bdfd395dd0974e120a64b79049371f8d2a | b5c6f2ee3630b346d5e582305d9a1414765d364f | /Morvan_tutorial/rl/dqn/DDQN.py | ced319d7fdb7b974d4dfa993ef1c6f9fd4fcd815 | [] | no_license | https://github.com/lyzustc/Reinforcement_Learning | e2997d21f63692efda6dc91865fe54f95c4534e8 | 2951a23557b25e3559019dcfb2f4a34a284f739d | refs/heads/master | 2022-02-12T12:01:46.677732 | 2019-10-24T20:51:34 | 2019-10-24T20:51:34 | 208,156,390 | 0 | 0 | null | false | 2022-05-26T20:33:43 | 2019-09-12T22:26:48 | 2019-10-24T20:51:37 | 2022-05-26T20:33:42 | 7,451 | 0 | 0 | 3 | C | false | false | import tensorflow as tf
import numpy as np
from DQN import DQN
class DoubleDQN(DQN):
def __init__(
self,
n_actions,
n_features,
sess,
learning_rate=0.01,
reward_decay=0.9,
e_greedy=0.9,
replace_target_iter=300,
memory_size=500,
batch_s... | UTF-8 | Python | false | false | 3,426 | py | 18 | DDQN.py | 16 | 0.526562 | 0.512259 | 0 | 124 | 26.637097 | 117 |
north-jewel/data_analysis | 15,556,371,588,841 | 0713453768df046ae31c7e6afca4b6a7514c6c7b | a886d4a2fc8febfff2686cb829b9cfaba2945f43 | /homework/谷晓宇-SnrsGu/1210/salary_site_analyze.py | 459d67cb45e00ec53471f7f8f3ec113638fad6a5 | [] | no_license | https://github.com/north-jewel/data_analysis | 017f4eedd6c1f00f187f9736d1b9afd980e97e0b | 6e077a6d777d9a339095fb133b7d9a6f9d408743 | refs/heads/master | 2020-04-03T20:32:39.514601 | 2019-01-06T12:52:16 | 2019-01-06T12:52:16 | 155,548,428 | 8 | 6 | null | false | 2018-11-20T09:13:38 | 2018-10-31T11:46:17 | 2018-11-20T09:11:40 | 2018-11-20T09:13:37 | 1,467 | 4 | 3 | 0 | Jupyter Notebook | false | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/12/10/9:24
# @Author : SnrsGu
# @Email : SnrsGu@qq.com & SnrsGu@gmail.com
# @File : salary_site_analyze.py
# @Software: PyCharm
from functools import reduce
import pandas as pd
from pylab import *
mpl.rcParams['font.sans-serif'] = ['Sim... | UTF-8 | Python | false | false | 1,908 | py | 488 | salary_site_analyze.py | 202 | 0.514354 | 0.504785 | 0 | 55 | 28.436364 | 94 |
vietnamican/Deep-Image-Matting-PyTorch | 3,264,175,160,308 | 06890bbde11978f7a686c251a4044ee182f822fa | a40cb085a50b3ced518074a6ec312fced3523cbd | /utils.py | 968b539ed7f30af107c3244f6e174d576c8a51a0 | [
"MIT"
] | permissive | https://github.com/vietnamican/Deep-Image-Matting-PyTorch | 3992992ad0e9f6b0389ac5811168367bc5647f20 | 3e5cbd5c1038e2bc864010b647522024a5ae4c8b | refs/heads/master | 2022-11-23T10:05:49.676284 | 2020-07-05T13:17:36 | 2020-07-05T13:17:36 | 263,933,260 | 1 | 0 | null | true | 2020-05-14T14:10:10 | 2020-05-14T14:10:10 | 2020-05-14T12:42:14 | 2020-01-09T06:21:22 | 527,563 | 0 | 0 | 0 | null | false | false | import argparse
import logging
import os
import math
import random
import cv2 as cv
import numpy as np
import torch
import torch.nn.functional as F
from torch.utils.data import Sampler
from skimage.measure import label
import scipy.ndimage
import scipy.ndimage.morphology
from torchvision import transforms
from config... | UTF-8 | Python | false | false | 13,600 | py | 20 | utils.py | 17 | 0.626691 | 0.611912 | 0 | 382 | 34.604712 | 112 |
Gattocrucco/lab4mpr | 2,018,634,653,928 | 0d2581093653a201e44a2c5f0a41b6ce4696099a | fd2908f80e6a20d1a2c9e7f39bc18ce53e625e9f | /esp-0-preliminare/petrillo/integral.py | d904a8fe2028927f55080195e822a2ce6f278afc | [] | no_license | https://github.com/Gattocrucco/lab4mpr | a79ecdcb293923188fcef637c7566bbb3904af05 | c613bb8e57c2943123697789f5b600483a2b4ff6 | refs/heads/master | 2021-09-15T08:15:19.129544 | 2018-05-28T23:20:47 | 2018-05-28T23:20:47 | 111,024,426 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from cmath import sin, cos, sqrt, log, tan
from pylab import arctan2, pi
def csc(x):
return 1/sin(x)
def cot(x):
return 1/tan(x)
def integ1(x, a):
return -(csc(x) * sqrt(-2 * a**2 + cos(2 * x) - 1) * log(sqrt(-2 * a**2 + cos(2 * x) - 1) + sqrt(2) * cos(x)))/sqrt(2 * a**2 * csc(x)**2 + 2)
def integ(x, a):... | UTF-8 | Python | false | false | 805 | py | 738 | integral.py | 141 | 0.490683 | 0.391304 | 0 | 24 | 32.375 | 248 |
udhayprakash/PythonMaterial | 5,488,968,253,088 | d85262260f5fcfc72b9d23bb046cc460d51bc8e3 | 0fd5793e78e39adbfe9dcd733ef5e42390b8cc9a | /python3/14_Code_Quality/01_static_typing/k_Union_type.py | 7cb6191172607e458c2ef7ba4024f2f628d5f8c7 | [] | no_license | https://github.com/udhayprakash/PythonMaterial | 3ea282ceb4492d94d401e3bc8bad9bf6e9cfa156 | e72f44e147141ebc9bf9ec126b70a5fcdbfbd076 | refs/heads/develop | 2023-07-08T21:07:33.154577 | 2023-07-03T10:53:25 | 2023-07-03T10:53:25 | 73,196,374 | 8 | 5 | null | false | 2023-05-26T09:59:17 | 2016-11-08T14:55:51 | 2023-03-06T13:38:50 | 2023-05-26T09:59:16 | 293,344 | 7 | 5 | 2 | Jupyter Notebook | false | false | """
Purpose: Union type
"""
from typing import Union
def is_even_whole(num) -> Union[bool, str]:
if num < 0:
return "Not a whole number"
return True if num % 2 == 0 else False
assert is_even_whole(10) is True
assert is_even_whole(19) is False
assert is_even_whole(-2) == "Not a whole number"
def is... | UTF-8 | Python | false | false | 610 | py | 1,490 | k_Union_type.py | 1,269 | 0.654098 | 0.619672 | 0 | 27 | 21.592593 | 50 |
NickSwainston/blindsearch_scripts | 16,853,451,673,555 | 311119d712055088faedb087d3ab5343758ce292 | 1c6cd2efc16e93b4a74e2eb0d62aaafbed9dac8e | /blindsearch_database.py | 8dac5afecf58341741eb4064c4724d7f953cad69 | [] | no_license | https://github.com/NickSwainston/blindsearch_scripts | 83f9bf0c0ba12a07975e8f827b1f00df6483a25f | 53c83d3f566db6ff9953b719ec16cac1f345de20 | refs/heads/master | 2018-10-16T10:04:24.547627 | 2018-10-16T08:59:15 | 2018-10-16T08:59:15 | 129,832,220 | 2 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import os, datetime, logging
import sqlite3 as lite
from optparse import OptionParser #NB zeus does not have argparse!
DB_FILE = os.environ['CMD_BS_DB_DEF_FILE']
#how many seconds the sqlite database conection takes until it times out
TIMEOUT=120
def dict_factory(cursor, row):
d = {}
for... | UTF-8 | Python | false | false | 23,612 | py | 10 | blindsearch_database.py | 9 | 0.509233 | 0.500762 | 0 | 512 | 45.068359 | 525 |
mayrazan/exercicios-python-unoesc | 4,561,255,304,696 | 45aea735a9423eaf194ca9d2a1d6dc7db4340889 | 264aa1cde73eafbe7c640658c435a9d7d288754e | /funcoes/2.py | 21a216a4e4ecf133f62e49c54f716d0f3ff98f9f | [] | no_license | https://github.com/mayrazan/exercicios-python-unoesc | bb64f7aa495c66c4c1d53569ec5c674df39f956c | e05137663587fa2ba7a636a688b4696989f895b1 | refs/heads/master | 2022-12-18T03:23:31.019903 | 2020-09-26T13:55:35 | 2020-09-26T13:55:35 | 293,115,733 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | def imprime(numero):
i = 1
lista = []
while i <= numero:
lista.append(i)
for e in lista:
print(e, end = ' ')
print('\n')
i+=1
| UTF-8 | Python | false | false | 146 | py | 39 | 2.py | 38 | 0.513699 | 0.5 | 0 | 9 | 15.222222 | 24 |
bunnyblanco/vendrest | 4,870,492,948,253 | 9ca20c93b9e4fcbb88fe688d2ab0a40d72c63416 | 25b7a4dcaa10d781ceac6e4d957dea5cd340bf46 | /scripts/accountability.py | 339672632d9e5c75d5ec805e427d1326a96316d1 | [
"MIT",
"BSD-3-Clause",
"Python-2.0",
"BSD-2-Clause"
] | permissive | https://github.com/bunnyblanco/vendrest | 241b293a2db7b9e6bfc6aba6b19341b0a17e117d | f922cb9bc504216673e02896c258ff270fedaee4 | refs/heads/master | 2020-12-31T06:22:24.167172 | 2019-04-17T14:04:02 | 2019-04-17T14:04:02 | 58,963,213 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import os
import configparser
from flask_script import Manager, Command
from vendcli import (
app,
views,
)
from vendcli.models.meta import (
engine,
Session
)
from vendcli.models import Transaction, Source
manager = Manager(app)
session = Session()
source_list = sessio... | UTF-8 | Python | false | false | 1,685 | py | 13 | accountability.py | 12 | 0.637389 | 0.607715 | 0 | 55 | 29.618182 | 116 |
rohidev001/databricks_adf_repo | 15,530,601,766,650 | 37587709c56613ff227a3140b382b6d33726d60f | 7112ebabcbab081b92dd2d31001b66291b208273 | /notebooks/Users/r.rahul.deshmukh@sapphireondemand.com/mynotebook.py | a7b086c63c58a2932debc25c5ae0640aa447e7a6 | [] | no_license | https://github.com/rohidev001/databricks_adf_repo | 582d401e503e7788cdacfe83b0977667f47fbccd | df0c9ab24eca3ee64cc2989077cd07bb7072fe86 | refs/heads/master | 2020-03-26T16:04:59.425323 | 2018-08-20T08:25:57 | 2018-08-20T08:25:57 | 145,081,736 | 0 | 0 | null | false | 2018-08-17T07:26:34 | 2018-08-17T06:35:25 | 2018-08-17T06:46:28 | 2018-08-17T07:26:34 | 0 | 0 | 0 | 0 | Python | false | null | # Databricks notebook source
# COMMAND ----------
# rest1.py
# This script should demo databricks REST API.
# ref:
# goog: With python how to authenticate to REST API?
# http://docs.python-requests.org/en/latest/
import requests
usr='r.rahul.deshmukh@sapphireondemand.com'
pas='dapi748a8e2e3d9113f3e74463038cef972d'
h... | UTF-8 | Python | false | false | 532 | py | 2 | mynotebook.py | 2 | 0.731203 | 0.663534 | 0 | 19 | 27.052632 | 68 |
mich326/scored | 13,486,197,327,230 | 7ff70680bf20834d2169f0517848b57ee90e1f85 | 7af634b9162dae00d13c6a85382a60e221ad3591 | /scored.py | 8394e9d12ba748a7fb7d53d7cfaf6c6f8073337b | [] | no_license | https://github.com/mich326/scored | d7e820de69ab239b473794f89cacacfc890b0a00 | 3634faff00cd6406928a05b81e7fc50ff2380085 | refs/heads/master | 2021-01-15T15:54:51.631049 | 2016-03-10T02:34:03 | 2016-03-10T02:34:03 | 50,685,317 | 0 | 0 | null | true | 2016-01-29T19:17:52 | 2016-01-29T19:17:52 | 2016-01-20T19:01:10 | 2016-01-22T19:47:49 | 14 | 0 | 0 | 0 | null | null | null | from selenium import webdriver
from bs4 import BeautifulSoup, SoupStrainer
import time, sys, os, difflib, fileinput, re, urllib2, cookielib, json, multiprocessing
if os.path.exists(os.getcwd()+'/scored.log'):
os.remove(os.getcwd()+'/scored.log')
if os.path.exists(os.getcwd()+'/journals.txt'):
os.remove(os.getcwd()+... | UTF-8 | Python | false | false | 13,793 | py | 1 | scored.py | 1 | 0.61669 | 0.612557 | 0 | 503 | 26.423459 | 112 |
tbobm/99problems | 12,592,844,115,553 | 3cb71a2b56972f44c874c1a856efe8cb69b2166e | d70b4d184cb80ee14e306755f7ef4bab5ee94f7b | /python/lists/P10.py | e2ba57602b7ca2d09d19a7219640857f05f612be | [] | no_license | https://github.com/tbobm/99problems | e29f65a59aa93f3ddca45ff114e24b1e3661f774 | 492146625bbe173fb31658a552d1c353eb11600f | refs/heads/master | 2021-06-01T05:42:13.412190 | 2016-07-16T14:43:07 | 2016-07-16T14:43:07 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # encoding: utf-8
# 1.10 (*) Run-length encoding of a list.
# Use the result of problem 1.09 to implement the so-called run-length encoding data compression method. Consecutive duplicates of elements are encoded as terms [N,E] where N is the number of duplicates of the element E.
#
# Example:
# ?- encode([... | UTF-8 | Python | false | false | 731 | py | 29 | P10.py | 27 | 0.573187 | 0.547196 | 0 | 23 | 30.826087 | 224 |
xiewjsir/learns | 5,360,119,233,352 | 4d91365563e554b79b5f6c008515bc63beef00cd | 5ca045803301e62caa7bb0946933621344161848 | /python/learnspider/dzdp/dzdp/spiders/spider.py | 770d5f15003eb80c4ff01ce01d40e9dbed7bd4c2 | [] | no_license | https://github.com/xiewjsir/learns | 9d5b1f85fff29b97027fefe1376f8088e0fc6f4e | 23808c34f294faf73055e5d4262fd5738a3ef214 | refs/heads/master | 2021-11-24T02:08:52.191540 | 2021-11-09T09:11:59 | 2021-11-09T09:11:59 | 163,933,868 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from scrapy import Spider, Request
import re
from lxml import etree
import json
from urllib.parse import quote
from dzdp.items import StoreItem, StorePictureItem
from copy import deepcopy
class Dzdp_spider(Spider):
name = 'dzdp'
allowed_domains = ['dianping.com']
classifys = {
'c21151': '购宠',
... | UTF-8 | Python | false | false | 978 | py | 51 | spider.py | 37 | 0.6 | 0.572917 | 0 | 30 | 30.766667 | 92 |
kevincrane/kevcrablog | 16,484,084,520,333 | 9b5209731bf512f68380a4a85385a06e0e1d40eb | 21fce83c2ebf4651cff8afe7191cf247b2c3969e | /app/kevcrablog/forms.py | c6afd9df59ab17e9c254eea682b9bf1b1f8ff886 | [] | no_license | https://github.com/kevincrane/kevcrablog | 51a211877d45de3bf5ce5f72769f769258b68924 | 1522fb5b718d67228626d5cf2910e004f4ce4db4 | refs/heads/master | 2021-01-10T20:13:17.619042 | 2018-06-28T00:04:39 | 2018-06-28T00:04:39 | 17,099,676 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask_wtf import Form
from wtforms import TextField, TextAreaField
from wtforms import validators
from wtforms.widgets import TextArea, HTMLString
class MarkdownWidget(TextArea):
""" Replacement TextArea for blog Markdown
- When typing, text is converted to markdown and displayed in
HTML di... | UTF-8 | Python | false | false | 1,141 | py | 57 | forms.py | 23 | 0.688869 | 0.688869 | 0 | 30 | 37.066667 | 113 |
ZhengkunTian/OpenTransformer | 13,907,104,139,548 | a2ebead905608bc05551bf324c0ca555f03da730 | b7f3d206f25221770fd707209f4343886e9639a9 | /otrans/encoder/base.py | 5109de6cf7530ad7b64c4fdbfa451b7c3a334c8f | [
"MIT"
] | permissive | https://github.com/ZhengkunTian/OpenTransformer | cfd4a9b41ae99d7246f202c8a565568a75261d00 | 802750a2bba2b5db5a61869a0819bce977bcd7d8 | refs/heads/master | 2022-07-26T19:40:11.824668 | 2022-07-21T01:25:09 | 2022-07-21T01:25:09 | 226,343,764 | 385 | 81 | MIT | false | 2021-11-08T04:27:05 | 2019-12-06T14:12:00 | 2021-11-05T01:39:19 | 2021-11-08T04:27:04 | 185 | 262 | 53 | 2 | Python | false | false | # File : base.py
# Author : Zhengkun Tian
# Email : zhengkun.tian@outlook.com
import torch
import torch.nn as nn
class BaseEncoder(nn.Module):
def __init__(self):
super(BaseEncoder, self).__init__()
def forward(self, inputs, inputs_mask, **kargs):
raise NotImplementedError
def infere... | UTF-8 | Python | false | false | 406 | py | 57 | base.py | 53 | 0.667488 | 0.667488 | 0 | 17 | 22.941176 | 66 |
akiitr/python0 | 10,015,863,736,992 | 9c30e1e26df8598fa44a8e6582fbe5957dd20288 | ef59676cee1fc4c523dac85db2d6bdb5454d7658 | /coursera_automation_google_python/c2/week6.py | 102f9b8f2c4bd813966a8e6e854b9d822a15786b | [] | no_license | https://github.com/akiitr/python0 | 549bdc9c31b63ffa3101c7dbaff2f75e7a733a26 | 8e4be64c4b6017cfdbe1b87ae3eac779a169acb8 | refs/heads/master | 2021-08-18T08:19:36.177206 | 2021-06-02T07:15:31 | 2021-06-02T07:15:31 | 210,405,972 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #Python script for the reanming the old username to new username
#!/usr/bin/env python3
import sys,subprocess
f = open(sys.argv[1])
lines = f.readlines()
f.close()
for line in lines:
line_new = line.strip().replace('jane','jdoe')
sub_inputs = ["mv",line.strip(),line_new]
subprocess.run(sub_inputs)
#Bas... | UTF-8 | Python | false | false | 719 | py | 21 | week6.py | 14 | 0.620306 | 0.585535 | 0 | 30 | 22.966667 | 70 |
aphp/edspdf | 1,503,238,575,094 | a7293d0cd54a1ff4ae7e5841e84fa857efa93177 | 465e9aeab1466708f2ee8f74075739c7c8f0cbd6 | /edspdf/pipes/classifiers/mask.py | 4be5450b0eca598f3bfce3bfb6a2897029c3f743 | [
"BSD-3-Clause",
"LicenseRef-scancode-commercial-license",
"AGPL-3.0-or-later"
] | permissive | https://github.com/aphp/edspdf | e87187dd7b2f47e2715b3074b4288b8e5eafbbb0 | 492db043ee0bb0d3a3fd42979c8ea6e70065e9f5 | refs/heads/main | 2023-08-17T03:25:57.713447 | 2023-08-04T13:05:53 | 2023-08-04T13:05:53 | 517,726,737 | 21 | 2 | BSD-3-Clause | false | 2023-09-07T14:46:23 | 2022-07-25T15:47:09 | 2023-08-23T09:37:37 | 2023-09-07T14:46:21 | 7,454 | 22 | 4 | 0 | Python | false | false | from typing import Sequence
from edspdf import Box, PDFDoc, Pipeline, registry
from edspdf.utils.alignment import align_box_labels
@registry.factory.register("mask-classifier")
def simple_mask_classifier_factory(
x0: float,
y0: float,
x1: float,
y1: float,
pipeline: Pipeline = None,
name: str... | UTF-8 | Python | false | false | 4,971 | py | 97 | mask.py | 53 | 0.485013 | 0.453028 | 0 | 224 | 21.191964 | 88 |
liammaloney/roman_study_tool | 455,266,555,258 | f2f83ffaba34d2593bdb1b64f9f4f92d583db439 | ee67ca2e97062d81d1ec11d3ce9011d1af3e639d | /data.py | 79aa29c3b859a4811f2272b8aa8d8fc4097021ce | [] | no_license | https://github.com/liammaloney/roman_study_tool | 00d72c7fa8e089692995f2cd23d7f2b86805d12b | 24db85e974c8331f904a743c01db144cce2ecebf | refs/heads/master | 2021-03-10T04:51:31.207714 | 2020-03-11T00:45:22 | 2020-03-11T00:45:22 | 246,420,929 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | PROVINCES = {
'Britannia':'2',
'Germania inferior':'3',
'Belgica':'4',
'Lugdunensis':'5',
'Germania superior':'6',
'Aquitania':'7',
'Alpes poeninae':'8',
'Alpes cottiae':'9',
'Alpes maritimae':'10',
'Narbonensis':'11',
'Tarraconensis':'12',
'Lusitania':'13',
'Baetica'... | UTF-8 | Python | false | false | 3,769 | py | 3 | data.py | 2 | 0.576852 | 0.518184 | 0 | 121 | 30.140496 | 104 |
Jimmy-INL/google-research | 3,719,441,708,105 | 041a9e41d48120aa56807d47f6a440a8a9459035 | e10a6d844a286db26ef56469e31dc8488a8c6f0e | /On_Combining_Bags_to_Better_Learn_from_Label_Proportions/Code/TrainTestCreation/twostraddlebags.py | 3db9ffa864a6a918f2a10bb4678c460eb9b35eec | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | https://github.com/Jimmy-INL/google-research | 54ad5551f97977f01297abddbfc8a99a7900b791 | 5573d9c5822f4e866b6692769963ae819cb3f10d | refs/heads/master | 2023-04-07T19:43:54.483068 | 2023-03-24T16:27:28 | 2023-03-24T16:32:17 | 282,682,170 | 1 | 0 | Apache-2.0 | true | 2020-07-26T15:50:32 | 2020-07-26T15:50:31 | 2020-07-26T13:45:43 | 2020-07-24T10:45:03 | 239,465 | 0 | 0 | 0 | null | false | false | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | UTF-8 | Python | false | false | 5,624 | py | 6,251 | twostraddlebags.py | 4,585 | 0.652738 | 0.648649 | 0 | 156 | 35.051282 | 74 |
vaishnavishetty19/Classification-of-Credit-Card-Transactions | 6,992,206,800,527 | 22862e7d622ae99c5625694007df70c1de8e196e | d0e506ec74bcea629b46139b9332bfaa146f2ec0 | /code for classification of credit card/app.py | 2f6bcedbcddafce3356711a8723ab927c42c566b | [] | no_license | https://github.com/vaishnavishetty19/Classification-of-Credit-Card-Transactions | c3a5ea97f17826a4df401ab6cc2d40c49217d1c4 | d1d3454be54f5788af01a9abe054c883f0bfe406 | refs/heads/main | 2023-06-01T08:04:56.643023 | 2021-06-23T20:04:47 | 2021-06-23T20:04:47 | 347,320,104 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Flask, render_template, request
import pickle
import numpy as np
with open('rf_pickle_model.pkl','rb') as file:
model = pickle.load(file)
app = Flask(__name__)
@app.route('/')
def man():
return render_template('home.html')
@app.route('/predict', methods=['POST','GET'])
def ... | UTF-8 | Python | false | false | 2,427 | py | 9 | app.py | 1 | 0.574372 | 0.407911 | 0 | 77 | 29.181818 | 213 |
conjure-up/conjure-up | 15,341,623,196,211 | 32acdb9e55daa1d0e234f936e2725f2ff5c65334 | 8b57ca58722bdd3b9335b10ead2ce578d67a636f | /conjureup/telemetry.py | 038e3efef7970b9f99c9904c7c6b90326dfd86b9 | [
"MIT"
] | permissive | https://github.com/conjure-up/conjure-up | 5257d1937961c13babb83cdb396701ff69aabcc4 | d2bf8ab8e71ff01321d0e691a8d3e3833a047678 | refs/heads/master | 2023-09-03T11:56:43.476146 | 2021-04-12T14:27:43 | 2021-04-12T14:27:43 | 45,847,491 | 473 | 78 | MIT | false | 2021-04-12T14:27:43 | 2015-11-09T15:36:18 | 2021-04-12T14:24:34 | 2021-04-12T14:27:43 | 2,677 | 456 | 74 | 103 | Python | false | false |
import asyncio
from functools import partial
import requests
from conjureup import __version__ as VERSION
from conjureup.app_config import app
GA_ID = "UA-1018242-61"
SENTRY_DSN = ('https://27ee3b60dbb8412e8acf6bc159979165:'
'b3828e6bfc05432bb35fb12f6f97fdf6@sentry.io/180147')
TELEMETRY_ASYNC_QUEUE = ... | UTF-8 | Python | false | false | 1,970 | py | 164 | telemetry.py | 141 | 0.60203 | 0.571574 | 0 | 69 | 27.536232 | 70 |
gjbex/Python-software-engineering | 15,058,155,354,265 | d304e5a7d550c81486416c72d70e0b90dd8d69fe | 06ebacb64cace791f8257fb6942a0bc3a40a8447 | /source-code/decorators/decorator.py | add3f0902c884297a267cf7515a01eb0e4eec655 | [
"CC-BY-4.0"
] | permissive | https://github.com/gjbex/Python-software-engineering | 07a2e22fa1d662e882fffe6a2c4b97326beba41b | 369045946ccd6fa8fc9638de1ad6b150126de76b | refs/heads/master | 2023-08-10T09:48:27.565554 | 2023-04-18T12:56:59 | 2023-04-18T12:56:59 | 221,865,259 | 23 | 19 | CC-BY-4.0 | false | 2023-04-18T12:56:53 | 2019-11-15T07:08:52 | 2023-04-18T11:21:33 | 2023-04-18T12:56:52 | 3,809 | 21 | 15 | 1 | Jupyter Notebook | false | false | #!/usr/bin/env python
from functools import wraps
class NegArgError(Exception):
def __init__(self, name, n):
super().__init__()
self.message = 'argument {0} for {1} negative'.format(n, name)
class TooLargeArgError(Exception):
def __init__(self, name, n):
super().__init__()
s... | UTF-8 | Python | false | false | 1,167 | py | 57 | decorator.py | 13 | 0.533847 | 0.520994 | 0 | 53 | 21.018868 | 71 |
AvaneeshKolluri/Agile_Methods_Project | 16,844,861,774,585 | 6b6a7a3520f116075d9219624d7caad5f80e54d8 | 39accf0a2ecff0bd0e16c912a6c7d3e353769b07 | /test_userStory13.py | 721494ea52914aba1033edd0a4504a593ca5bc73 | [] | no_license | https://github.com/AvaneeshKolluri/Agile_Methods_Project | 4b7529d735ad8b3b4edae6aa81fd6acc28da17f0 | 00959adc3e103ce3f67778d667f77054068c674d | refs/heads/master | 2023-01-21T05:20:43.937680 | 2020-11-30T00:17:39 | 2020-11-30T00:17:39 | 296,751,189 | 0 | 1 | null | false | 2020-10-26T22:47:09 | 2020-09-18T23:43:40 | 2020-10-26T21:12:22 | 2020-10-26T22:46:49 | 1,145 | 0 | 1 | 0 | HTML | false | false | import unittest
from userStories import userStory13
import HtmlTestRunner
class TestUserStory13Class(unittest.TestCase):
def test_UserStory13_1(self):
resultsList = userStory13("InputGedFiles/UserStory13_GED/testUserStory13-1.ged")
self.assertEqual(resultsList, [])
def test_UserStory13_2(self... | UTF-8 | Python | false | false | 1,750 | py | 80 | test_userStory13.py | 45 | 0.624571 | 0.516571 | 0 | 25 | 69 | 163 |
neuroradiology/Gooey | 17,497,696,777,048 | 2991a58d585d642149ac9148bfdf8b7819c0023a | dd3ca62ee1dab07eaf84ebbc0535d8e5627e1f62 | /gooey/tests/test_processor.py | 0fd866687200b777c10008e65e54508eb8b6582f | [
"MIT"
] | permissive | https://github.com/neuroradiology/Gooey | f03b51677be1fb280485b689434afdb725da0e29 | 59684fc507c118b683f22f968d733b71afde4ee1 | refs/heads/master | 2021-08-15T22:15:13.252224 | 2021-01-24T17:23:24 | 2021-01-24T17:23:24 | 23,333,982 | 5 | 3 | MIT | true | 2021-01-24T17:23:24 | 2014-08-26T01:04:20 | 2018-04-24T19:37:02 | 2021-01-24T17:23:24 | 2,148 | 4 | 2 | 0 | null | false | false | import re
import unittest
from gooey.gui.processor import ProcessController
class TestProcessor(unittest.TestCase):
def test_extract_progress(self):
# should pull out a number based on the supplied
# regex and expression
processor = ProcessController(r"^progress: (\d+)%$", Non... | UTF-8 | Python | false | false | 1,705 | py | 135 | test_processor.py | 109 | 0.635777 | 0.616422 | 0 | 39 | 41.717949 | 85 |
lucyemmel/speedwagon-foundation-shop | 5,360,119,232,226 | a2550f4a7f4e7d574584d7a2ef5db74376595e1b | de5d7bab4e35b3f2a6426ce09e0d9726443c3737 | /simple_ecommerce/simple_ecommerce/middleware.py | ec466cee584dc3e13ae19a081d1c7cd23816016e | [] | no_license | https://github.com/lucyemmel/speedwagon-foundation-shop | 595135643e7ac325d356c46c68b6ab02221b4882 | e62bc4593dfafb74e260e46339f55c0d4d0345f8 | refs/heads/main | 2022-12-30T20:22:16.477284 | 2020-10-21T15:08:57 | 2020-10-21T15:08:57 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class FramingControlMiddleware:
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
response = self.get_response(request)
response['Content-Security-Policy'] = 'frame-ancestors http://localhost:3000 http://127.0.0.1:3000'
return respo... | UTF-8 | Python | false | false | 324 | py | 27 | middleware.py | 13 | 0.657407 | 0.614198 | 0 | 9 | 35 | 107 |
Nauendorf/fizzbuzz_python | 16,698,832,876,359 | 2f9bcec26fd4fdc51b52dc6dea5bc598d9e6571a | 969adb984423cbc4e7e8716dbf84519ff03cde1f | /notes.py | 51ead3e3b65a89f8cab57c2b934c1074aeebda84 | [] | no_license | https://github.com/Nauendorf/fizzbuzz_python | b08d534c0d7b4201548d405c05a3e99436c89833 | 935be824d0238c14c78d5d1937fefd68a6455124 | refs/heads/master | 2020-12-27T01:09:07.645030 | 2020-02-15T11:32:36 | 2020-02-15T11:32:36 | 237,714,334 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # import sys
#
#
# test = sys
#
#
# print([a for a in dir(test)])
# print([a for a in dir(test) if not a.startswith('__')])
# print(', '.join(i for i in dir(sys) if not i.startswith('__')))
import sys
import platform
def getsysinfo():
return [a for a in dir(platform) if not a.startswith('__')
and prin... | UTF-8 | Python | false | false | 402 | py | 3 | notes.py | 3 | 0.577114 | 0.577114 | 0 | 20 | 19.1 | 65 |
pecata83/soft-uni-python-solutions | 2,070,174,273,475 | eec18a869c8b9e7e71740088826b767c8bd49d1d | f95e0c64792ff7c00b997bd645181f74b3aa3add | /Python Advanced/01. Stacks and Queues Exercise/04.01.py | 7a7b2eea4a29b0820443893ada929ebd4ad18edb | [] | no_license | https://github.com/pecata83/soft-uni-python-solutions | 6f28fde73ff261c8294c1dd5ea0ad72b6bb4e342 | e9746b4b60e803376e475c1e6638964ca4013849 | refs/heads/main | 2023-02-25T18:01:11.933019 | 2021-02-02T20:49:28 | 2021-02-02T20:49:28 | 329,273,364 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | clothes_stack = [int(x) for x in input().split()]
rack_capacity = int(input())
current_rack_capacity = rack_capacity
racks_used = 1
while clothes_stack:
cloth = clothes_stack.pop()
if current_rack_capacity >= cloth:
current_rack_capacity -= cloth
else:
racks_used += 1
current_rac... | UTF-8 | Python | false | false | 375 | py | 191 | 04.01.py | 190 | 0.650667 | 0.645333 | 0 | 18 | 19.833333 | 53 |
NicolasBerveglieri/STAGEM2 | 1,752,346,688,366 | 2ade4d4346ebd66c6eea1cb589abd69eb6fbcf4b | 537f91bc0a6d0b33550c8378a416c3856e876f9f | /moead_ego.py | e9b30608d3fa9bdf59caad11abf6a45ed71666a0 | [] | no_license | https://github.com/NicolasBerveglieri/STAGEM2 | 69ce502ba52b5e8729e4c969d3a1f08258fe553d | 8119f5e4973b1b2023233bdb0ea5228d50437b00 | refs/heads/master | 2020-03-18T12:24:39.457129 | 2018-10-02T17:09:26 | 2018-10-02T17:09:26 | 134,724,856 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed May 2 15:49:04 2018
@author: nicol
"""
import numpy.linalg as np
from scipy.spatial import distance
import heapq
from random import randint
import random
from random import *
import sys
import sklearn
from sklearn.svm import SVR
import numpy as np
from meoa... | UTF-8 | Python | false | false | 3,424 | py | 96 | moead_ego.py | 13 | 0.605317 | 0.580777 | 0 | 92 | 34.98913 | 123 |
andrewschreiber/agent | 1,915,555,443,579 | 5bee984bf94786b07bae012b1f55c7f5369eda8d | a011e4096ce9635419cd2d19883ccbd979bbb9a3 | /tensorboard/plugins/debugger/debugger_server_test.py | b95f90ff2d6a930ac4222b32f918c1a3ebab250c | [
"Apache-2.0"
] | permissive | https://github.com/andrewschreiber/agent | d9cdd480cb7d7d596095256e223b7b6773ababf5 | 7ad0b37e8ce3ea1f5ff0eac02c23195736ed6f68 | refs/heads/master | 2020-03-31T08:31:13.695921 | 2019-05-07T02:21:50 | 2019-05-07T02:21:50 | 152,060,727 | 16 | 2 | Apache-2.0 | true | 2019-04-29T05:57:49 | 2018-10-08T10:21:50 | 2019-04-02T21:36:16 | 2019-04-29T05:57:48 | 78,607 | 12 | 0 | 1 | Python | false | false | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | UTF-8 | Python | false | false | 11,177 | py | 316 | debugger_server_test.py | 114 | 0.666995 | 0.650264 | 0 | 258 | 42.321705 | 80 |
yb8350/OnrestChatbot | 2,645,699,889,464 | b547bae6649cd987615096fcc12e30ab383830e5 | 17e4570eadefa3fc31a6ff2d9fac113c1f72ece8 | /mrp.py | 673ec84834729d1e66e43b90f981068c7681c87e | [] | no_license | https://github.com/yb8350/OnrestChatbot | 5b12bcff7be25dec4cab928573605bc7327f1d25 | 9d2e85d2fd9bff088e90177b527c8253cf9a8f72 | refs/heads/master | 2023-07-24T18:17:19.940698 | 2021-08-30T16:41:02 | 2021-08-30T16:41:02 | 401,236,264 | 2 | 2 | null | null | null | null | null | null | null | null | null | null | null | null | null | import re
import math
import datetime
import pandas as pd
from konlpy.tag import Komoran
kom = Komoran(userdic='./UserDictionaryData.txt')
SongLocation = pd.read_csv ('./SongLocation.csv')
EmoDic = pd.read_csv ('./EmotionalDictionary.csv')
negative = [('않', 'VX'), ('못하', 'VX'), ('말', 'VX'), ('아니', 'MAG'), ('아니', 'VCN... | UTF-8 | Python | false | false | 6,653 | py | 5 | mrp.py | 4 | 0.507916 | 0.477691 | 0 | 216 | 27.953704 | 323 |
wangyum/Anaconda | 6,433,861,015,599 | 468141573796b0dec768be5d8acd772180538fcf | 1dacbf90eeb384455ab84a8cf63d16e2c9680a90 | /lib/python2.7/site-packages/openopt/solvers/CoinOr/ipopt_oo.py | ea4fde06ede58745943b5e9a8817cc2168202fdd | [
"Python-2.0",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-unknown"
] | permissive | https://github.com/wangyum/Anaconda | ac7229b21815dd92b0bd1c8b7ec4e85c013b8994 | 2c9002f16bb5c265e0d14f4a2314c86eeaa35cb6 | refs/heads/master | 2022-10-21T15:14:23.464126 | 2022-10-05T12:10:31 | 2022-10-05T12:10:31 | 76,526,728 | 11 | 10 | Apache-2.0 | false | 2022-10-05T12:10:32 | 2016-12-15T05:26:12 | 2018-10-20T18:15:17 | 2022-10-05T12:10:31 | 935,904 | 10 | 7 | 1 | Python | false | false | from numpy import *
import re
from openopt.kernel.baseSolver import baseSolver
from openopt.kernel.nonOptMisc import Vstack, Find, isspmatrix
#import os
try:
import pyipopt
pyipoptInstalled = True
except:
pyipoptInstalled = False
class ipopt(baseSolver):
__name__ = 'ipopt'
__license__ = "CPL"
... | UTF-8 | Python | false | false | 6,072 | py | 4,623 | ipopt_oo.py | 3,931 | 0.470191 | 0.459486 | 0 | 169 | 34.91716 | 217 |
devin300team/booking-django | 6,081,673,694,748 | 268d0a32673c22bc062a971934d9ec0954210fc3 | 866acfd3218483c647f1798b9ee386e6c58b8fb8 | /listings/views.py | b50a2282d3a92fbd9e6e13625c9f293cb6790338 | [] | no_license | https://github.com/devin300team/booking-django | 987fe05a5d579084bfcf7122316d38823fa6a301 | 274c5d3edd1783bc4890761c8cc8dc6b38af0d22 | refs/heads/main | 2023-05-01T20:20:54.067353 | 2021-05-25T03:36:00 | 2021-05-25T03:36:00 | 370,549,920 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import json
from django.core.serializers import serialize
from rest_framework.response import Response
from .serializers import ListingSerializer, BookingInfoSerializer
from .models import Listing, BookingInfo
from rest_framework.decorators import api_view
from rest_framework.views import APIView
from rest_framework im... | UTF-8 | Python | false | false | 2,556 | py | 9 | views.py | 9 | 0.606025 | 0.606025 | 0 | 60 | 41.616667 | 106 |
Ganna05/Python-algorithms-and-structures | 13,082,470,418,990 | 81500c1173c89af0749960c4d0143b221ca2b55f | adff07e71383be3f2549f40822c1fc6adfad6742 | /Lesson 3. Task 2.py | a4290b615209a5f469561df57f5f66be990ebec6 | [] | no_license | https://github.com/Ganna05/Python-algorithms-and-structures | 193c8ea2d77c8760014c3d735d254736a8e2fc9c | dfe60aef61b9e41c90c2afb1b0e2f9751709f8bd | refs/heads/master | 2020-04-15T02:33:23.198706 | 2019-01-27T14:40:19 | 2019-01-27T14:40:19 | 164,318,872 | 0 | 0 | null | false | 2019-02-10T10:32:38 | 2019-01-06T15:14:41 | 2019-01-27T14:40:22 | 2019-02-10T10:29:18 | 12 | 0 | 0 | 2 | Python | false | null | # 2. Во втором массиве сохранить индексы четных элементов первого массива. Например, если дан массив со значениями 8, 3, 15, 6, 4, 2,
# то во второй массив надо заполнить значениями 1, 4, 5, 6 (или 0, 3, 4, 5 - если индексация начинается с нуля),
# т.к. именно в этих позициях первого массива стоят четные числа.
import... | UTF-8 | Python | false | false | 1,080 | py | 9 | Lesson 3. Task 2.py | 8 | 0.708672 | 0.670732 | 0 | 20 | 35.9 | 133 |
openstack/horizon | 9,534,827,445,672 | 8c8cab23f9bb0be4f2fc04d750ff723a0421104d | 69d8d91954f6623f3674d52d734d589f72383628 | /openstack_dashboard/dashboards/project/floating_ips/tests.py | ecaff90481d0709f90302a86cf2a22d002584c3e | [
"Apache-2.0"
] | permissive | https://github.com/openstack/horizon | d031cebe126c06ad9717bbc52790b3d890e8661e | 7896fd8c77a6766a1156a520946efaf792b76ca5 | refs/heads/master | 2023-09-04T06:57:58.069907 | 2023-09-01T20:17:10 | 2023-09-01T20:17:10 | 2,665,166 | 1,060 | 1,175 | Apache-2.0 | false | 2023-08-07T02:33:44 | 2011-10-28T13:12:05 | 2023-07-28T08:39:05 | 2023-08-06T07:39:56 | 354,181 | 1,303 | 1,250 | 0 | Python | false | false | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
# Copyright (c) 2012 X.commerce, a business unit of eBay Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")... | UTF-8 | Python | false | false | 18,370 | py | 2,064 | tests.py | 1,011 | 0.601361 | 0.599565 | 0 | 388 | 46.345361 | 80 |
seer-group/Robokit_TCP_API_py | 10,256,381,914,790 | 3de4c836ce118267b15478ec09a3bd78d52ce990 | c0151d01bdedd17484b4f3d83bfc77ca7b39f2c9 | /rbkApiCopyFile.py | 49bedbab4d75e38204ae1325ccd45707a800ba03 | [] | no_license | https://github.com/seer-group/Robokit_TCP_API_py | 5e9f369fcabd6ab262da26e52af0e3f8bfb0eef7 | a407ea56767ec50cfea4ed301a6c2c9894de3845 | refs/heads/master | 2022-12-13T02:42:52.794738 | 2018-03-21T06:08:47 | 2018-03-21T06:08:47 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from rbkNetProtoEnums import *
import rbkNetProtoEnums
import json
import socket
import os
so = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
so.settimeout(2)
#so.connect(('192.168.4.109', API_PORT_STATE))
so.connect(('192.168.192.5', API_PORT_ROBOD))
so.send(packMsg(1, robot_daemon_scp_req, {
"path": '/... | UTF-8 | Python | false | false | 683 | py | 15 | rbkApiCopyFile.py | 14 | 0.666179 | 0.5959 | 0 | 32 | 20.34375 | 84 |
tireub/Chromaffin | 14,491,219,659,008 | 60fe9696164535111da5ca0eadaaa7487ea51763 | 79f1eafcfa8089615bdcc0cc2048e10826a9c2f3 | /Models.py | c5d9ea609d7e5cbaee1e392c65014f492b89eb4d | [] | no_license | https://github.com/tireub/Chromaffin | b35a1890c603aeff523f33afa235dc52eec68ca9 | 56ddec1cc988a4a8361a46c8da7d4ce6d95f2d54 | refs/heads/master | 2020-04-05T05:11:11.352452 | 2018-12-27T11:23:45 | 2018-12-27T11:23:45 | 156,584,633 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from sqlalchemy import Column, Integer, String, Date, ForeignKey, DECIMAL
from sqlalchemy.orm import relationship
from Base import Base
class Cell(Base):
__tablename__ = 'cell'
id = Column(Integer, primary_key=True)
name = Column(String(100))
date = Column(Date)
stimulation_time = Column(Integer... | UTF-8 | Python | false | false | 3,608 | py | 24 | Models.py | 21 | 0.646341 | 0.640244 | 0 | 123 | 28.317073 | 76 |
Prorok1015/Summary | 9,131,100,475,899 | 00dfc66e2341af153ea28d0c28607ad2bd024fb2 | 99ab6f0e9efcd67be68125f04f4229c0f5b698be | /script/PageAlgoritm.py | da8014e6cc6f47c2c9f3d475f90d17ebd3e91355 | [] | no_license | https://github.com/Prorok1015/Summary | 516c7c0d55b9cd4a2c4de4f5dc1d98aa794f9d3c | 51ac376f5aa7f8de545a648e60c5be3bf2cb0c39 | refs/heads/master | 2022-11-07T06:57:56.166778 | 2020-06-22T12:20:50 | 2020-06-22T12:20:50 | 251,022,376 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from wiki.models import settingUser, Page, PageStatmant, randomUnicalPage
class Algoritm():
hour = 0
def do(self):
self.hour += 1
settings = settingUser.objects.all()
for setting in settings:
if settingUser.One_hour == setting.Time_to_new_page:
... | UTF-8 | Python | false | false | 1,146 | py | 31 | PageAlgoritm.py | 18 | 0.582897 | 0.573298 | 0 | 29 | 38.310345 | 113 |
QCAPI-DRIP/DRIP | 15,238,544,011,700 | e39729ad81dc1edc71e74bd4051bdb3dcafb0577 | 5836cc43cd4ee1bcf22e168eba6a7539d0876b3b | /drip_parser/src/rpc_server.py | eb44724b1f77e7753bba605fab21932191fbe488 | [
"Apache-2.0"
] | permissive | https://github.com/QCAPI-DRIP/DRIP | d2ce1816a6b0aeda0cac44d7763cadf0c5999941 | 57a8fd69327f38805597a3c040938206b9728048 | refs/heads/master | 2020-04-06T14:46:01.628824 | 2018-11-14T13:30:41 | 2018-11-14T13:30:41 | 157,553,634 | 0 | 0 | Apache-2.0 | true | 2018-11-14T13:34:08 | 2018-11-14T13:34:08 | 2018-11-14T13:33:53 | 2018-11-14T13:30:42 | 134,680 | 0 | 0 | 0 | null | false | null | # To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
import os
import os.path
import pika
import sys
import tempfile
import time
import json
import yaml
from transformer.docker_compose_transformer ... | UTF-8 | Python | false | false | 7,015 | py | 199 | rpc_server.py | 128 | 0.571205 | 0.56536 | 0 | 180 | 37.811111 | 204 |
jfangwpi/Interactive_planning_and_sensing | 9,294,309,255,955 | 729484341a57bc2f5da26f57d3b33f04c3363824 | 881067724ddcf277c21854f647eaa56054944e15 | /src/lcmtypes/python/graph_data/map_data.py | 03d8d3f576c3f61116955b7b8dfafda67634be9c | [
"MIT"
] | permissive | https://github.com/jfangwpi/Interactive_planning_and_sensing | 004d58ccdcaa1178e24a1186119e862e86afbf3f | 00042c51c2fdc020b7b1c184286cf2b513ed9096 | refs/heads/master | 2023-02-13T03:13:46.496128 | 2020-05-29T18:24:49 | 2020-05-29T18:24:49 | 267,086,265 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """LCM type definitions
This file automatically generated by lcm.
DO NOT MODIFY BY HAND!!!!
"""
try:
import cStringIO.StringIO as BytesIO
except ImportError:
from io import BytesIO
import struct
import graph_data.vertex_data
class map_data(object):
__slots__ = ["num_v_", "vertex_"]
__typenames__ = [... | UTF-8 | Python | false | false | 2,289 | py | 181 | map_data.py | 109 | 0.609436 | 0.597204 | 0 | 70 | 31.685714 | 115 |
pratik-iiitkalyani/Python | 4,398,046,547,850 | 985bfa7d6dec4eddc1595d3bb9f22e74dbf87b71 | a4653fb6c5a7a9e6db0457480e9e860c5304b2b8 | /OOPs/operator_overloading_polymorphism.py | 896d16f3dad5ca64e1cdc90af473147c7c904b36 | [] | no_license | https://github.com/pratik-iiitkalyani/Python | c315ca1f3a2446ccb871b74026edae97daec3773 | 082ae6d833f151054567d737de543898ebfe1d87 | refs/heads/master | 2020-08-07T05:59:21.930089 | 2020-01-04T17:05:27 | 2020-01-04T17:05:27 | 213,324,642 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # operator overloading
# polymorphism - many forms
# method overriding is also a example of polymorphism
class Phone:
def __init__(self, brand, model, price):
self.brand = brand
self.model = model
self.price = price
def phone_name(self):
return f"{self.brand} {self.model}"
... | UTF-8 | Python | false | false | 1,421 | py | 172 | operator_overloading_polymorphism.py | 168 | 0.629134 | 0.605911 | 0 | 48 | 28.458333 | 92 |
PreciadoAlex/PreciadoAlex.github.io | 7,876,970,057,386 | 73a4a90c6ee8d45111ea1436135712c640ef4365 | 3da1fbc9e7b826bbe7d4b92574b882896786d5b2 | /Projects/Python_start/Preciado_StepOneWhile.py | e540603e9fc37ae87be1b0b7b740b014c934e04f | [] | no_license | https://github.com/PreciadoAlex/PreciadoAlex.github.io | 0b451dc7f082b49f909b9d90cdac43cc4ddd6892 | fc2163d4534de3fa7d73397377a7afd6ef07b225 | refs/heads/master | 2021-09-24T08:45:04.761435 | 2018-10-06T08:11:15 | 2018-10-06T08:11:15 | 110,735,773 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | acc = 1
while acc < 11:
print (acc)
acc = acc + 1
| UTF-8 | Python | false | false | 64 | py | 23 | Preciado_StepOneWhile.py | 16 | 0.453125 | 0.390625 | 0 | 5 | 10.8 | 17 |
stompingBubble/PythonBootcamp | 16,655,883,190,545 | 5c9917d3961d6dc7d74119f9705e8f632946b1c3 | a2735476958c0315e43d3b6ffe8b22701b9a469e | /TicTacToe1.py | 89a29c7e48c8c560c9ee150787030f8a256ef96d | [] | no_license | https://github.com/stompingBubble/PythonBootcamp | ad67fd32fcf01ccaabd0eb0d183ef1496ff22423 | fcb51b6ecda0f0812d46ba3dd0b1d15660e334e7 | refs/heads/master | 2021-07-17T22:40:41.887419 | 2017-10-24T17:37:39 | 2017-10-24T17:37:39 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
"""
Spyder Editor
"""
# In[1]:
import os
# global variables
board = [" "] * 10
game_state = True
position = 0
player = {"Player one": [True, "X"], "Player two": [False, "O"]}
number_of_tries = 0
invalid_input = True
not_empty_position = True
# In[2]:
def clear_game():
global board, ga... | UTF-8 | Python | false | false | 3,869 | py | 12 | TicTacToe1.py | 11 | 0.522874 | 0.490049 | 0 | 156 | 23.769231 | 99 |
gyang274/leetcode | 1,537,598,340,098 | a0a33e104deed965366b17861cbb5d1079ae3a15 | 242f1dafae18d3c597b51067e2a8622c600d6df2 | /src/1500-1599/1545.kth.bit.in.nth.binary.str.py | 640b92fde1db7a7e99d812700ada70b960178614 | [] | no_license | https://github.com/gyang274/leetcode | a873adaa083270eb05ddcdd3db225025533e0dfe | 6043134736452a6f4704b62857d0aed2e9571164 | refs/heads/master | 2021-08-07T15:15:01.885679 | 2020-12-22T20:57:19 | 2020-12-22T20:57:19 | 233,179,192 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution:
def findKthBit(self, n: int, k: int) -> str:
f, k = 0, k
while n > 1:
m = 1 << (n - 1)
if k == m:
return str(1 ^ f)
elif k > m:
k = (1 << n) - k
f = f ^ 1
n -= 1
return str(0 ^ f)
if __name__ == '__main__':
solver = Solution()
cases = [
... | UTF-8 | Python | false | false | 491 | py | 1,461 | 1545.kth.bit.in.nth.binary.str.py | 1,456 | 0.429735 | 0.399185 | 0 | 23 | 20.347826 | 53 |
ascorblack/library | 14,860,586,850,374 | 36bdce419df8a22dad050aadd34ad62939d5e20e | 1d3d3a645662a40674ef3748882f3bccc464001e | /gui.py | 7bb6146ad32123915223a7b0163ca52b2658247d | [] | no_license | https://github.com/ascorblack/library | 88e280b5a8d20f39c73038a82874fe61a9417599 | 46616bb730f422b25d7454917d0dfc6a43f9dbb6 | refs/heads/main | 2023-07-28T15:15:08.538299 | 2021-09-08T06:54:03 | 2021-09-08T06:54:03 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import eel
from eel import expose
import os
import json
import numpy as np
from PIL import Image
from io import BytesIO
import base64
from mainElastic import Book, show_warn, get_all_categories
from recommendation_ai.ai_rec import get_similarity, get_cosine_book
from sys import exit
db = Book()
def add_stat(name_sta... | UTF-8 | Python | false | false | 8,290 | py | 13 | gui.py | 5 | 0.577323 | 0.567159 | 0 | 279 | 28.616487 | 115 |
fzhcary/TCEF_Python_2020 | 14,199,161,920,535 | 6bd7c67c30fee5165412d87413c7bdb69ae3aca5 | cf0dfc31213c0a8cd0c6c0b5837fff07c2501991 | /selection_sort.py | 11a6181b2b255cce6ef616c4f1a25b7234047b95 | [] | no_license | https://github.com/fzhcary/TCEF_Python_2020 | 1c26103e2c1b65b50631ad4a728523c9ff1f118e | b753ca65b33a21d9094954ebb4193bfc97b8c056 | refs/heads/master | 2023-02-27T16:25:28.340662 | 2021-02-06T21:38:41 | 2021-02-06T21:38:41 | 282,457,824 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Selection Sort
def selection_sort(nums):
size = len(nums)
for j in range(1, size):
# on the last run, j: size -1
max_number = nums[size - j]
max_i = size - j
for i in range(0, size - j):
if nums[i] > max_number:
max_i = i
max_number ... | UTF-8 | Python | false | false | 740 | py | 36 | selection_sort.py | 5 | 0.508108 | 0.474324 | 0 | 31 | 22.774194 | 65 |
saif409/Construction_management_system | 11,227,044,541,160 | debd80ab07d1f495f9972aa823ffdb6ab8123853 | 900780eedf00e1fbeab43d229e0b83acf76d668d | /sadmin/urls.py | f038b6c39eb44f637104d64c2524747d8ffbaa4a | [] | no_license | https://github.com/saif409/Construction_management_system | 126318a04112b8457da35ca78164b3eddeac00a8 | 6a0b5ffaabf22fea4c41ac5bd38a90f7e947f1cd | refs/heads/main | 2023-04-10T19:25:23.975509 | 2021-05-01T15:04:30 | 2021-05-01T15:04:30 | 352,547,638 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.urls import path
from.import views
urlpatterns = [
path('', views.user_login, name="login"),
path('home/', views.home, name="home"),
path('user_logout/', views.user_logout, name="user_logout")
]
| UTF-8 | Python | false | false | 221 | py | 36 | urls.py | 8 | 0.656109 | 0.656109 | 0 | 9 | 23.555556 | 63 |
DTUWindEnergy/PyWake | 16,166,256,903,451 | 5d734a02cc2cf3826cb028f498c4e678687671e7 | 42e0f154e0f18be3d5a6532b796036bead7ff996 | /py_wake/examples/data/ParqueFicticio/_parque_ficticio.py | 9da436c2d3ee3490dee1855664c0f6c648731cc7 | [
"MIT"
] | permissive | https://github.com/DTUWindEnergy/PyWake | 75d7dd5cedae68761958389b15d585191b200a90 | 36da70b2335321e435194d277511c17d8f012571 | refs/heads/master | 2023-08-20T09:00:30.946594 | 2023-08-10T12:07:55 | 2023-08-10T12:07:55 | 164,115,313 | 53 | 29 | MIT | false | 2022-11-07T08:47:06 | 2019-01-04T14:10:20 | 2022-11-04T02:27:01 | 2022-11-07T07:30:13 | 118,718 | 36 | 18 | 3 | Python | false | false | from py_wake.site.wasp_grid_site import WaspGridSite, load_wasp_grd
from py_wake.examples.data.ParqueFicticio import ParqueFicticio_path
from py_wake import np
from py_wake.site.distance import TerrainFollowingDistance
"""
min x: 262878
min y: 6504214
max x: 265078
max y: 6507414.0
Resolution: 100
columns: 23
rows: 33... | UTF-8 | Python | false | false | 946 | py | 250 | _parque_ficticio.py | 172 | 0.641649 | 0.469345 | 0 | 33 | 27.666667 | 98 |
0x913/python-practice-projects | 6,047,313,984,715 | eec58f4410fcd7adc04f44846b67e1a98c205413 | 4f67ac7517ea46b733f80a27d181374666131d6e | /python practice projects/Exceptions & Files/finally.py | 979cc498b947bf7ccd5dae1c388638015de2b35b | [] | no_license | https://github.com/0x913/python-practice-projects | 42af39ad6eed5ef82ff18a66523beecb4739805f | d3aea4a2b2bba4e1dabd56633be47e19c13ede16 | refs/heads/master | 2021-02-05T20:33:27.197069 | 2020-02-28T18:41:44 | 2020-02-28T18:41:44 | 243,828,924 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | try:
print(1)
print(10 / 0)
except ZeroDivisionError:
print(unknown_var)
finally:
print("This is executed last") | UTF-8 | Python | false | false | 148 | py | 46 | finally.py | 45 | 0.574324 | 0.547297 | 0 | 13 | 9.538462 | 33 |
paris3200/AdventOfCode | 4,801,773,475,163 | a713bb09bf0101e408db788c5e84d86a0a7a5996 | 0a70a9873bf09d56fd72faf0a00174660aaf07e6 | /code/2021/10/tests.py | f92b17b003a0cd23858007f465a5bc809ec74e4c | [] | no_license | https://github.com/paris3200/AdventOfCode | 40ef0828e70ed6736212a3cfe0574c6a26fe94bd | 8cd9dcbd946026d69b1f19a1495480f3ac6a41a0 | refs/heads/master | 2022-12-22T23:36:12.727295 | 2022-12-12T11:52:14 | 2022-12-12T11:52:14 | 226,195,265 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pytest
from aoc_10 import is_valid, part_one, complete_lines, score_autocomplete, part_two
@pytest.mark.parametrize(
("line", "expected"),
(
("{([(<{}[<>[]}>{[]{[(<()>", "}"),
("[({(<(())[]>[[{[]{<()<>>", True),
),
)
def test_is_valid(line, expected) -> None:
assert is_valid(li... | UTF-8 | Python | false | false | 993 | py | 83 | tests.py | 82 | 0.504532 | 0.48137 | 0 | 44 | 21.568182 | 83 |
lim0606/likelion | 17,763,984,754,472 | 87bc40f3b6dcd4dd88aa5af262374569cfb0f34b | aac3b8e8c01d93f71bb1bab05dbc9588ba3b765a | /w5_flaskr_upgrade/apps/flaskr_mvc.py | 6615cac11f724a85ba80389deef813be37bfe462 | [] | no_license | https://github.com/lim0606/likelion | 4f4a505e8e1cf1ce92e0c091d188f67fda5c3e26 | ec2fefae45897afd09d7f78dca1f979a28932e4b | refs/heads/master | 2021-01-22T04:43:56.803627 | 2014-09-06T08:11:22 | 2014-09-06T08:11:22 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# all the imports
from flask import request, redirect, url_for,\
render_template
from apps import app
from database import Database
from datetime import datetime
dataStorage = Database()
@app.route('/', methods=['GET', 'POST'])
def show_entries():
entries = dataStorage.out()
ret... | UTF-8 | Python | false | false | 2,459 | py | 31 | flaskr_mvc.py | 20 | 0.658804 | 0.655551 | 0 | 88 | 26.943182 | 81 |
ElTapia/computacion-grafica | 17,085,379,905,875 | 83c523604f4028d288a3769e92be85f12c76c032 | 77e31a5c86c78ce2e4967532417435275dc07b58 | /Ejercicios/Ejercicio_3/Version Windows/Ejercicio_3_Windows.py | 2555458a754a74e1bb13f2720a1e2275fa5f2fb1 | [
"MIT"
] | permissive | https://github.com/ElTapia/computacion-grafica | 742f90d40adf3bf9b43c49e34d7b91182b1bb233 | 8d6ec5e1bd2426093f253da9a197a7b74bb656a9 | refs/heads/main | 2023-08-23T14:10:21.792322 | 2021-11-01T15:42:21 | 2021-11-01T15:42:21 | 348,476,472 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding=utf-8
"""Ejercicio 3: Planeta tierra orbitando alrededor del sol y luna alrededor de la tierra
Extra: La tierra y la luna también tienen movimiento de rotación.
"""
import glfw
from OpenGL.GL import *
import OpenGL.GL.shaders
import numpy as np
import sys
import os.path
sys.path.append(os.path.dirname(os.pat... | UTF-8 | Python | false | false | 7,815 | py | 39 | Ejercicio_3_Windows.py | 26 | 0.673242 | 0.654925 | 0 | 240 | 31.529167 | 125 |
urudaro/data-ue | 8,761,733,294,684 | 76b9cf3fc17c394cc798c25943178ce75acc89e4 | b39d9ef9175077ac6f03b66d97b073d85b6bc4d0 | /Sorbisterit_powder_for_oral_or_rectal_suspension_SmPC.py | 6554d2305f3901c13418c3c670de3619ee50e9ae | [] | no_license | https://github.com/urudaro/data-ue | 2d840fdce8ba7e759b5551cb3ee277d046464fe0 | 176c57533b66754ee05a96a7429c3e610188e4aa | refs/heads/master | 2021-01-22T12:02:16.931087 | 2013-07-16T14:05:41 | 2013-07-16T14:05:41 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | {'_data': [['Common',
[['Metabolism', u'hyperkalcemi, hypokalemi, hypomagnesemi'],
['GI', u'illam\xe5ende, kr\xe4kningar']]],
['Uncommon',
[['GI',
u'f\xf6rstoppning, diarr\xe9, tarmobstruktion, ulceration, kolonnekros som kan ge perforation, anorexi']]],
... | UTF-8 | Python | false | false | 1,198 | py | 3,177 | Sorbisterit_powder_for_oral_or_rectal_suspension_SmPC.py | 3,177 | 0.679466 | 0.660267 | 0.016694 | 15 | 78.933333 | 630 |
noh-hyeonseong/python3-algorithm-level1 | 4,037,269,290,431 | c2dd1be41120c2c01716a3f9db7a579ff46b99ce | 8f5e4e2aa50a629c93ad7be317d7139f7394e699 | /행렬의덧셈.py | de18616f213d7beb321d6caf468a217abc79197e | [] | no_license | https://github.com/noh-hyeonseong/python3-algorithm-level1 | d0c9b76d539e6cab5c68bb6c5a7ba12e87073640 | 5aec6c24fb3c3fb2833bdc80e4af7c0bd9e8fddd | refs/heads/master | 2023-06-06T02:34:02.882296 | 2021-06-29T06:16:05 | 2021-06-29T06:16:05 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
def solution(arr1, arr2):
"""
행렬은 numpy 모듈을 활용하면 더 쉽게 풀 수 있음
import numpy as np
"""
#numpy 사용 코드
A = np.array(arr1)
B = np.array(arr2)
answer = (A + B).tolist()
print(answer)
return answer
#기존 코드
# answer = []
# for i, j in zip(arr1, arr2):
#... | UTF-8 | Python | false | false | 507 | py | 24 | 행렬의덧셈.py | 24 | 0.512035 | 0.498906 | 0 | 23 | 18.913043 | 34 |
Green-Project/Green | 6,768,868,465,423 | 14579c9cf1a109d063bbb61aa549a955b59c7e7b | 82459da507886101871a750241b1b108baccbb9f | /IA/api/config.py | f8cbf33520fe19a799a294258131aa153b32be0e | [] | no_license | https://github.com/Green-Project/Green | e5be745a31a1623eb6336dae3a5aec1a72f90b1c | da491f7278cc3acaf24c7441ae14d0922a266b58 | refs/heads/main | 2023-06-19T11:06:10.401324 | 2021-07-04T11:22:23 | 2021-07-04T11:22:23 | 317,233,527 | 2 | 0 | null | false | 2020-12-10T17:30:29 | 2020-11-30T13:32:46 | 2020-12-10T15:22:17 | 2020-12-10T17:30:28 | 2,482 | 3 | 0 | 3 | JavaScript | false | false | env = {
"SERVER_PORT": 8000,
"TOKEN_SECRET": "hsf7ClN471QKJ6DPgreI"
} | UTF-8 | Python | false | false | 77 | py | 52 | config.py | 23 | 0.623377 | 0.506494 | 0 | 4 | 18.5 | 42 |
AdamR77/Palindrom | 13,675,175,881,382 | 61a8a1817c62bf2c138232bf2c48e8814b25073f | 358cb092e7c15884f81b7269640f730bfcb69422 | /palindrom.py | be2ab1ae954b6070b09416f1a79b4605adca618d | [] | no_license | https://github.com/AdamR77/Palindrom | 18ba7ffb48070377e0bba3b7f4d4205a2ca74f0a | 5b1c714662385a7a8849690f517b1b144998217a | refs/heads/main | 2023-08-23T11:31:49.206317 | 2021-10-13T20:03:25 | 2021-10-13T20:03:25 | 416,882,078 | 0 | 0 | null | false | 2021-10-17T15:56:09 | 2021-10-13T20:02:33 | 2021-10-13T20:03:27 | 2021-10-17T15:56:09 | 1 | 0 | 0 | 2 | Python | false | false |
def check_palindrom (string):
reversed_string = string[::-1]
if string == reversed_string:
return True
else:
return False
#spr
string = "madam"
if check_palindrom(string) == True:
print(string," is palnindrom")
| UTF-8 | Python | false | false | 244 | py | 1 | palindrom.py | 1 | 0.631148 | 0.627049 | 0 | 11 | 20.909091 | 35 |
neuracr/privacyAggretationTSPOC | 17,806,934,433,482 | cd7e723648ea1413b399b313ec8715d357d8df1f | 99bf30df817ee022e7e4ac43b26bbac5a58a2a5f | /main.py | 496259fe198ae8ea89b4cb560cc3b72e197c4797 | [] | no_license | https://github.com/neuracr/privacyAggretationTSPOC | 8f6b4dc42f584cfebbdbfff1a90a7dc8642957fb | c878bf4ba89b3011fa2eb701f83768c31064b9e4 | refs/heads/master | 2021-02-05T21:01:13.269003 | 2020-09-22T09:38:21 | 2020-09-22T09:38:21 | 243,832,133 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import logging
from poc.aggregator import Aggregator
from poc.participant import Participant
from poc.ttp import TTPBasic
import matplotlib.pyplot as plt
big_delta = 2000 # delta
eps = 0.5
small_delta = 0.001
n = 120
gamma = 0.5
logger = logging.getLogger(__name__)
def experiment_basic(n, t, eps, small_delta, big_... | UTF-8 | Python | false | false | 2,439 | py | 12 | main.py | 11 | 0.614596 | 0.600656 | 0 | 81 | 29.111111 | 72 |
Ilfarro/live_code_django | 506,806,186,717 | 2a6ddc7c82d8068aeeff17eabbf63bbced4ecf8b | 4d2d0f1b51ddfccb2f3aaec0e97025f94d3c0c95 | /home/migrations/0006_home_barang_deskripsi.py | 8dcbea8c0e8c7a3dea0ca4c98565129b2d4a20b8 | [] | no_license | https://github.com/Ilfarro/live_code_django | ea446dc7efc930e4f04293bde020a909bf7a5288 | 5ababb51fe583b1d907dffd50cb43672805f31fd | refs/heads/master | 2020-04-22T19:22:15.097587 | 2019-02-14T03:55:51 | 2019-02-14T03:55:51 | 170,605,321 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.1.7 on 2019-02-14 03:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0005_remove_home_barang_deksripsi'),
]
operations = [
migrations.AddField(
model_name='home_barang',
name='d... | UTF-8 | Python | false | false | 434 | py | 12 | 0006_home_barang_deskripsi.py | 8 | 0.592166 | 0.548387 | 0 | 19 | 21.842105 | 54 |
Anri-Lombard/PythonBootcamp | 6,347,961,682,829 | 6b54921fd7019587f2bdd9eebb1cb63ab2d057d8 | 5e0a08cd66692443f477245a2ec45ff4e672bcba | /day2/18.py | c0fb375b51155f5bced7d7558be17df01fa74f44 | [] | no_license | https://github.com/Anri-Lombard/PythonBootcamp | 30b224294de7878cf65066943285c788b2ab9505 | 8504d1fd15b47a9cbe187f4e99e598265dec0b5d | refs/heads/main | 2023-04-14T18:10:43.997879 | 2021-04-25T04:17:09 | 2021-04-25T04:17:09 | 341,822,181 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # num_char = len(input("What is your name? "))
#
# print("Your name has " + str(num_char) + " characters.")
a = 123
# use type() function to investigate types
print(type(a)) | UTF-8 | Python | false | false | 174 | py | 78 | 18.py | 67 | 0.643678 | 0.626437 | 0 | 7 | 24 | 58 |
nathaliatvrs/checagem_precos | 6,038,724,047,262 | 17603d3c594b144ddd8beb7214c71c0a78ffdd91 | 8a833ffd5a0d65e3a954982e6ff35061dfb6968c | /pdleo/leo.py | ce0b4950ba89b03dbcc04dd1a91f6fc7c55658b2 | [
"MIT"
] | permissive | https://github.com/nathaliatvrs/checagem_precos | 4ab7c62d3ac9feddc3d1c0d8b0299cec33acbc5c | 025c143f8ab921c54d4283ca34335597989e4666 | refs/heads/master | 2020-11-25T01:51:20.945006 | 2019-12-16T21:35:53 | 2019-12-16T21:35:53 | 228,437,873 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# coding: utf-8
# ## Importando bibliotecas
# In[3]:
import pandas as pd
import re
from io import BytesIO
from os import listdir
from os.path import join
from unicodedata import normalize
import platform
# In[8]:
if platform.system() == 'Linux':
from IPython.core.magic import register_... | UTF-8 | Python | false | false | 13,029 | py | 2 | leo.py | 1 | 0.520981 | 0.516754 | 0 | 422 | 29.829384 | 150 |
mawunyodm/PointOfSale | 11,501,922,439,663 | 6d711285ceab7c7592a2cc48d5dd808772035bbd | 459797c1ed60c9899f882710418555dd7261257d | /Authentication.py | 404ddcbd77df400f5cea7903f56930f3b5709150 | [] | no_license | https://github.com/mawunyodm/PointOfSale | 2f3f286974b0475767eb3a72bb6ce7c14eb567c3 | 894b705bd47ad415d21b4ee8fe8cbf6c3cb7c6d0 | refs/heads/master | 2023-03-01T00:10:39.685128 | 2021-02-11T05:55:10 | 2021-02-11T05:55:10 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from tkinter import *
from tkinter import messagebox
import sqlite3
authScreen = Tk()
authScreen.title("POS START")
authScreen.geometry("500x300")
spacingFrame = Frame(authScreen)
frame = Frame(bg="green",padx=10)
welcomeLabel = Label(frame,text="STOP & SHOP",font=("roboto",10,"bold"),pady=10)
# CREATING AND/OR CO... | UTF-8 | Python | false | false | 5,693 | py | 6 | Authentication.py | 5 | 0.663973 | 0.627964 | 0 | 168 | 32.892857 | 119 |
Genza999/readme_cli | 18,391,049,962,858 | 8ad74ab861702762f76c7c858451d832b81abedd | fea9d83430fe4ba6bfc858d155ca92fcc5dfbe9a | /setup.py | b1442f681f6a3e98c05bf6d4d9e373a4bf2bd44c | [
"MIT"
] | permissive | https://github.com/Genza999/readme_cli | 3f9c5699889dfc8d3e7ed86f52df3158bd12123b | 66c059ee253cac4727788426e7ca3f65f2c1e035 | refs/heads/main | 2023-01-01T12:07:59.815321 | 2020-10-21T13:48:11 | 2020-10-21T13:48:11 | 304,986,941 | 5 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import io
import os
import re
import sys
from setuptools import find_packages
from setuptools import setup
if sys.version_info[:3] < (3, 0, 0):
print("Requires Python 3 to run.")
sys.exit(1)
def read(filename):
filename = os.path.join(os.path.dirname(__file__), filename)
text_type = type(u"")
wi... | UTF-8 | Python | false | false | 1,769 | py | 7 | setup.py | 5 | 0.590729 | 0.556246 | 0 | 60 | 28.483333 | 99 |
s3593810/IoT-Based-Automation | 5,093,831,228,413 | cc0a4b6149a49997e89381e1078ee6082a7fb21a | f2c6a0fbbc1728ab409975157dfdf00826b23e74 | /App_Logging.py | 45a6d26fff2c1fbd450ce99daaba05bddcede9cf | [] | no_license | https://github.com/s3593810/IoT-Based-Automation | 9f140ba3492f59a49680e66a673402cacd20fd42 | ecbd24282789748710ce7d3043361fb4347dbebd | refs/heads/master | 2021-04-16T07:24:07.926742 | 2019-04-07T11:04:55 | 2019-04-07T11:04:55 | 249,337,462 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import logging
class SenseHatApp_logging:
logger = logging.getLogger(name='AppLogger')
def __init__(self):
self.logger.setLevel(logging.DEBUG)
formatter = logging.Formatter(
'[%(asctime)s:%(module)s:%(lineno)s:%(levelname)s] %(message)s'
)
filehandler = logging.Fil... | UTF-8 | Python | false | false | 480 | py | 12 | App_Logging.py | 10 | 0.654167 | 0.654167 | 0 | 15 | 31 | 75 |
dcollins4096/p19_newscripts | 13,511,967,151,120 | 50ce160e378f898ab8c85548b12e722775ef0e48 | 04a643a77927bc56ab58c7df91d4733321e61e51 | /tools_data/annotate_hair.py | ad6584f0d03d804fdd70e93a6ad8734a3a100c30 | [] | no_license | https://github.com/dcollins4096/p19_newscripts | d2fae1807170a4d70cf4c87222a6258211f993ff | 23c780dd15b60944ed354406706de85282d0bee6 | refs/heads/master | 2023-07-21T11:53:55.188383 | 2023-07-18T17:38:21 | 2023-07-18T17:38:21 | 215,159,839 | 0 | 3 | null | null | null | null | null | null | null | null | null | null | null | null | null |
import yt
import matplotlib.pyplot as plt
from yt.visualization.plot_modifications import *
import pyximport; pyximport.install()
import particle_ops
import particle_grid_mask
from scipy.spatial import ConvexHull
import h5py
import time
import numpy as na
import os
import pdb
import copy
class HairCallback(PlotCallba... | UTF-8 | Python | false | false | 5,177 | py | 530 | annotate_hair.py | 500 | 0.546455 | 0.53757 | 0 | 151 | 33.251656 | 102 |
justincurl/prior-time | 19,155,554,177,324 | 472787400978210e38254cdc15c865d5f15b34d7 | 8227e890fc6e222c600342024a2cac1838f97d97 | /otime/config.py | 8b2b8bb1f1b8d66ef21c678b40ceb6941b5881ed | [
"MIT"
] | permissive | https://github.com/justincurl/prior-time | aa95070e36bc2e52681a66e6580cff015426c540 | af74ca50272560a37f1ef9dd29816b9c58a58ac4 | refs/heads/master | 2021-04-24T13:32:56.437632 | 2020-12-27T02:09:47 | 2020-12-27T02:09:47 | 250,124,168 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | """
This file includes all available configuration options for the otime app.
Modify this file to set all your preferences - also modify `templates/otime/Results.html` to your liking
which will be displayed after all questions of all blocks have been answered.
It's not recommended to edit any of the other files.
Be ... | UTF-8 | Python | false | false | 2,099 | py | 51 | config.py | 17 | 0.65698 | 0.636494 | 0 | 69 | 29.42029 | 104 |
AndrewGYork/msim | 8,478,265,488,337 | 7205dbe00cc852d02a809b710677d29f035ac0d7 | cc6886ef475eebfa2f0e126a04041f5ec5427ff8 | /data_processing/convolve_sparse.py | 4ed41e647be0d42461f48ea3e2a11027343f9ba1 | [] | no_license | https://github.com/AndrewGYork/msim | 5d88784b21235f124d0c21ef835b69bdfe672039 | 5eb8370eb0979cf564b956a7e1adb3038d8f505e | refs/heads/master | 2021-01-13T00:52:25.160450 | 2015-10-15T17:14:28 | 2015-10-15T17:14:28 | 44,332,737 | 2 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import time
import numpy
def convolve_sparse(a, locations_list, amplitude_list=None):
if amplitude_list == None:
amplitude_list = [1 for l in locations_list]
assert len(locations_list) == len(amplitude_list)
output = numpy.zeros_like(a)
for j, location in enumerate(locations_list)... | UTF-8 | Python | false | false | 1,242 | py | 41 | convolve_sparse.py | 40 | 0.556361 | 0.537037 | 0 | 43 | 26.883721 | 72 |
LibreChou/Data-Finance-Cup | 1,047,972,039,537 | 620a9e1e83f66c5ffda6142acf8ddeb268f8856f | 76e7a508d6a4fb07f2ee3a596ecb84e20a717041 | /xm_80.py | afead151f42e8b8271100da22ee4f9ba59760a70 | [] | no_license | https://github.com/LibreChou/Data-Finance-Cup | 986b31c228ea5dec340ffff838b9d3101249b8d3 | 55efd7c6438c697bb4d1ddcd30b12c2c6e9fe0e0 | refs/heads/master | 2022-04-20T20:17:07.342575 | 2019-12-21T02:00:08 | 2019-12-21T02:00:08 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # !pip install xgboost --user
# !pip install tqdm --user
# !pip install seaborn --user
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
def load_xgb_data():
train = pd.read_csv("new_data/train.csv")
train_target = pd.read_csv('new_data/train_target.csv')
train = train.merge(train_target, o... | UTF-8 | Python | false | false | 8,317 | py | 51 | xm_80.py | 30 | 0.577866 | 0.533043 | 0 | 184 | 43.98913 | 115 |
jakebyford/web-scraping-challenge | 17,497,696,791,287 | 9a351f42e96e1a18208cf2c37f20b700c16508f5 | 0a54454a452e91d2c4b53c6cd01fecb1c6bd2e6f | /Mission to Mars/app.py | c9db3cd5a35986212db77d000aa657a9ab5b3acc | [] | no_license | https://github.com/jakebyford/web-scraping-challenge | c8f28d6502d7e956d220b8c717eb0c61a1dcee1f | a8e0f764c2a5c4122d361f54aa0b4ad69e9c0be8 | refs/heads/master | 2022-12-13T03:11:23.310368 | 2020-09-02T21:26:45 | 2020-09-02T21:26:45 | 290,950,206 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from flask import Flask, render_template, redirect
from flask_pymongo import PyMongo
import scrape_mars
app = Flask(__name__)
#Allowing mongo to be used in flask - use mars_app - is the identical code in mongodb
mongo = PyMongo(app, uri = "mongodb://localhost:27017/mars_app")
@app.route("/")
def init_browser():
... | UTF-8 | Python | false | false | 671 | py | 2 | app.py | 2 | 0.66766 | 0.660209 | 0 | 31 | 20.645161 | 85 |
ztl2004/recover | 5,385,889,017,475 | aa0efed1aff12d8032b96c27d9cdd568bae84c67 | d783ce5216bafe180f6d63986e7754a1df490139 | /models.py | 031b86e776d57fa9d4d5bfb8472486bee983ba9d | [] | no_license | https://github.com/ztl2004/recover | 4e91dcb1020bd12d3577e11bf0e1cd1bc5d6cda2 | 0367af4145488fb487293e09a81a229d9b103377 | refs/heads/master | 2021-01-19T00:16:33.427391 | 2013-07-06T11:52:53 | 2013-07-06T11:52:53 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, ForeignKey, DateTime, BigInteger, Text
Base = declarative_base()
class Rat(Base):
__tablename__ = 'rats'
id = Column(Integer, primary_key=True)
name = Column(String(100))
title = Column(String(100)... | UTF-8 | Python | false | false | 887 | py | 1 | models.py | 1 | 0.600902 | 0.587373 | 0 | 34 | 25.058824 | 86 |
adambaranec/math | 11,287,174,079,024 | d56bf712fd061d9cf0b937b7364cbd09cf9f577e | 7780dc31dc58ce153409b3f043543bbff1a3c707 | /count.py | 454d309b08a1c6753c3a46ab8a1f3b7bd7424c34 | [] | no_license | https://github.com/adambaranec/math | 828c087fc2516d0f783493b1219b9f685773cc1e | 1294428f79a27d85c1d85a9ed378bc01587c1b9e | refs/heads/main | 2023-08-22T05:17:53.160958 | 2021-10-19T18:27:43 | 2021-10-19T18:27:43 | 408,085,582 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import ui, math, texts as tx
from tkinter import messagebox
def prvy():
if ui.shape.get() == 1:
try:
getside = ui.dlzka.get()
side = float(getside)
obsah = side * side
zapis = str(obsah)
stav = tx.writesqarea + zapis
ui.l_obsahstvorca.pack_forge... | UTF-8 | Python | false | false | 3,877 | py | 8 | count.py | 7 | 0.535208 | 0.53237 | 0 | 115 | 32.721739 | 56 |
ZZhangsyx/RE01_NOAA_GPM | 5,815,385,725,879 | 33a96e8037b81b040a923baf2246f655d44ad74e | 73982949ace4ef0dfc0df98accabaf45de8fc20c | /Code/Train_class.py | bf5be2e17635bf9057240cc3e79fd78ffdcac453 | [] | no_license | https://github.com/ZZhangsyx/RE01_NOAA_GPM | 5c959efb7c734046f3c8ee1942081defb20194f2 | fbba1ce5f90fb8953cbde8813b0956f5ddf6c0f5 | refs/heads/master | 2023-07-14T06:34:16.194060 | 2021-08-25T01:38:40 | 2021-08-25T01:38:40 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # coding=utf-8
"""
Author: Zhang Zhi
Email: zhangzh49@mail2.sysu.edu.cn
Date: 2021/1/5
"""
import numpy as np
import pandas as pd
import tensorflow as tf
import os
from imblearn.over_sampling import SMOTE
import joblib
from sklearn.model_selection import RandomizedSearchCV
from sklearn.ensemble import Ra... | UTF-8 | Python | false | false | 9,676 | py | 10 | Train_class.py | 5 | 0.555854 | 0.545408 | 0 | 279 | 32.65233 | 85 |
colbyjantzen/my-first-blog | 4,904,852,672,752 | 45fae0d654257f7dbb34f9cb1bd7155bc7a65dd5 | 2f54353bcb535093560f3a0e63c62859d6055846 | /blog/migrations/0007_auto_20180226_2126.py | 1cc8c59e0d5930866914a9076cd195b941e044a4 | [] | no_license | https://github.com/colbyjantzen/my-first-blog | 4f3f7034559e700118da81256d3d749209848d10 | e0228208ab6c917eead518f3ec3dfbb3d12f17ac | refs/heads/master | 2021-04-27T02:27:14.656091 | 2018-03-23T00:08:52 | 2018-03-23T00:08:52 | 122,695,051 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2018-02-27 02:26
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('blog', '0006_post_date'),
]
operations = [
migrations.AlterField(
... | UTF-8 | Python | false | false | 429 | py | 7 | 0007_auto_20180226_2126.py | 5 | 0.58042 | 0.531469 | 0 | 20 | 20.45 | 48 |
PINTO0309/PINTO_model_zoo | 17,566,416,260,342 | 6fd166fc37fce37fa8ae4d62e4d858d79a9bc60d | 4e2117a4381f65e7f2bb2b06da800f40dc98fa12 | /158_HR-Depth/onnx_merge.py | 4de8daa29ba205aebcc0a0960cb6db63b98afac9 | [
"MIT",
"AGPL-3.0-only",
"LicenseRef-scancode-proprietary-license"
] | permissive | https://github.com/PINTO0309/PINTO_model_zoo | 84f995247afbeda2543b5424d5e0a14a70b8d1f1 | ff08e6e8ab095d98e96fc4a136ad5cbccc75fcf9 | refs/heads/main | 2023-09-04T05:27:31.040946 | 2023-08-31T23:24:30 | 2023-08-31T23:24:30 | 227,367,327 | 2,849 | 520 | MIT | false | 2023-08-31T23:24:31 | 2019-12-11T13:02:40 | 2023-08-31T20:36:11 | 2023-08-31T23:24:30 | 186,868 | 2,861 | 508 | 8 | Python | false | false | import onnx
import onnx_graphsurgeon as gs
import sclblonnx as so
H=192
W=640
MODEL1=f'lite_hr_depth_k_t_encoder_{H}x{W}.onnx'
MODEL2=f'lite_hr_depth_k_t_depth_{H}x{W}.onnx'
MODEL3=f'lite_hr_depth_k_t_encoder_depth_{H}x{W}.onnx'
graph1 = gs.import_onnx(onnx.load(MODEL1))
for n in graph1.nodes:
for cn in n.inputs:... | UTF-8 | Python | false | false | 1,540 | py | 1,252 | onnx_merge.py | 301 | 0.571429 | 0.527273 | 0 | 69 | 21.318841 | 54 |
2923mark/Python_learn | 16,784,732,228,228 | ef6edffa5739159ce79c62b1b314465c017e7217 | 3f4789c1479f7c6b34ebda4e0a0cdb7277adc65d | /in.py | 71b6d8d92a266a3b630491400f16a10935b42439 | [] | no_license | https://github.com/2923mark/Python_learn | a8932f80fe12ccc5d7d0e55b1608e801987ed4f7 | 405bcb70deb1c9ac6477de37e6e05b55e9ef2e3a | refs/heads/master | 2021-01-01T06:27:15.917088 | 2013-08-13T18:59:45 | 2013-08-13T18:59:45 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/python
Users = ['mlh', 'foo', 'bar']
raw_input ('Enter your user name:') in Users
| UTF-8 | Python | false | false | 93 | py | 2 | in.py | 1 | 0.623656 | 0.623656 | 0 | 3 | 30 | 44 |
shu004/calculator-2 | 3,839,700,795,289 | 5c5bef3660b16c6af7d382a64ab0e8e30cc495f5 | bc215d2187944bd0cd98329efda339716e7282b5 | /calculator.py | 98c6d0be5b4a15714d307b1c26c88281160c4aac | [] | no_license | https://github.com/shu004/calculator-2 | 909db9100c52247f0fa57c3d3174e34fb1f4c51b | fc65b0e773e88cfff6d56437ad2e6a3aebfcb2a6 | refs/heads/main | 2023-09-06T02:17:43.818712 | 2021-11-04T00:15:08 | 2021-11-04T00:15:08 | 424,419,930 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | """CLI application for a prefix-notation calculator."""
from functools import reduce
from arithmetic import (add, subtract, multiply, divide, square, cube,
power, mod, )
while True:
command = input("> ").split(" ")
operator = command[0]
if operator == "q":
break
else:
... | UTF-8 | Python | false | false | 2,283 | py | 1 | calculator.py | 1 | 0.43802 | 0.42707 | 0 | 68 | 32.485294 | 70 |
yl54/interview-problems | 8,718,783,653,844 | 9e8b068d089e1cf23d5af1755a433a9aac428ad5 | b8254aa9d1b6efeaba35d72b79548c8db6c53628 | /python/tree/contacts.py | 810e95429cd2b017f7a2c2a39a3b0ecdea3c7ab2 | [] | no_license | https://github.com/yl54/interview-problems | eefbd79f538ce7b8e41fffd39b3c53938f91dcc1 | 357bb35c7bc78c1df8c240d423e3727ca1a73abd | refs/heads/master | 2023-08-23T20:59:24.728841 | 2023-08-21T19:23:25 | 2023-08-21T19:23:25 | 115,690,385 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #
# Complete the 'contacts' function below.
#
# The function is expected to return an INTEGER_ARRAY.
# The function accepts 2D_STRING_ARRAY queries as parameter.
#
"""
given a set of queries to add a string to the state and find a string
implement these queries
"""
"""
test cases
different starting characters
a sing... | UTF-8 | Python | false | false | 6,665 | py | 175 | contacts.py | 131 | 0.605401 | 0.6012 | 0 | 291 | 21.90378 | 179 |
adamLange/freecadutil | 2,250,562,912,270 | ec077940b5d46992986d760a7fade6bf650e3734 | bc10663c7b51710a20a5c2c5ae8b04f15ab35b8c | /PyOCCLevelUtils.py | fb69d9e05b5de319ca97e7f13fc4675f040b5724 | [] | no_license | https://github.com/adamLange/freecadutil | 0eddddf541a20fe37263c6dd28c0e35fc7bee7fb | 12884709e16e2d52c9cfede9d8cc278f5e788a39 | refs/heads/master | 2021-01-17T16:14:31.000327 | 2018-02-23T04:41:33 | 2018-02-23T04:41:33 | 71,716,603 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from OCC.Geom import Geom_BSplineSurface, Handle_Geom_BSplineSurface
from OCC.TColgp import TColgp_Array2OfPnt
from OCC.TColStd import TColStd_Array1OfReal, TColStd_Array2OfReal, TColStd_Array1OfInteger
from OCC.gp import gp_Vec, gp_Trsf, gp_Pnt
from OCC.BRepBuilderAPI import BRepBuilderAPI_MakeFace
import numpy as np
... | UTF-8 | Python | false | false | 11,035 | py | 16 | PyOCCLevelUtils.py | 15 | 0.54599 | 0.51527 | 0 | 384 | 27.736979 | 162 |
dsr373/phase-locked-loops | 3,504,693,336,795 | 12301e239c0ce1a52eef9fda7b5beb95097bac87 | 40b46d370ec4c4763627566df36f6d723b7a33be | /python/analysis/vco_freqs.py | d2b8122faa6a4d2020ac83f186f53111a4b6a721 | [] | no_license | https://github.com/dsr373/phase-locked-loops | fdb6e14e9f5711e8e33c3a510f07073dff69f581 | 3e89b8c84de6f9af1f3b6b3d7fac8d5e950342c2 | refs/heads/master | 2021-02-07T11:46:07.742683 | 2018-10-22T20:26:13 | 2018-10-22T20:26:13 | 244,021,483 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import csv
from ..measurement.utils.gui_utils import def_input
FONTSIZE = 20
# the measurements are dictionaries from the expected_v to arrays of the measured values
v_in = {}
f_out = {}
results = {}
with open('data/vco/vco_R1M.tsv') as fin:
r... | UTF-8 | Python | false | false | 1,549 | py | 32 | vco_freqs.py | 30 | 0.622337 | 0.612008 | 0 | 53 | 28.226415 | 88 |
humabilgin/2048-Game-With-Expectimax-Algorithm | 17,162,689,326,044 | 8363c21ac5db695171ee372f6962a4ed9b777368 | 7cb3ae5a61bef09ccd6308a4b2cae422a7455943 | /2048-expectimax-ai-master/expectimax.py | b5031d73c916b0764c0017d358bae3b93e061463 | [] | no_license | https://github.com/humabilgin/2048-Game-With-Expectimax-Algorithm | 4f0419bc6c44a0ee31b1cc3a492089cd38a5685e | f79f71b3910f0102c4fd6eca0688a88efeb0b8b8 | refs/heads/main | 2023-06-29T19:08:35.527415 | 2021-07-30T09:32:13 | 2021-07-30T09:32:13 | 391,004,572 | 5 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import math
import time
import numpy as np
UP, DOWN, LEFT, RIGHT = range(4)
class Expectimax():
def get_move(self, board):
best_move, _ = self.maximize(board)
return best_move
#degerlendirme fonksiyonu
def evaluationFunction(self, board, n_empty):
grid = board.grid
emp... | UTF-8 | Python | false | false | 4,516 | py | 2 | expectimax.py | 1 | 0.628406 | 0.612104 | 0 | 102 | 42.892157 | 151 |
bruecksen/pumpwerk | 16,750,372,463,222 | a707df1e0c691e9a5e4648cc6f294690602e2191 | 491bd7a305859b380d777f3420b099d4790ca807 | /pumpwerk/food/migrations/0001_initial.py | bcad2f3a3228d1e92fd0424890e124214bb8d120 | [
"MIT"
] | permissive | https://github.com/bruecksen/pumpwerk | 65103eb741c49691b203b419e9752dad996fd089 | e76df6bedee3e338b10106565f0f6139fa63994c | refs/heads/master | 2023-05-31T20:59:24.721234 | 2022-11-16T15:20:36 | 2022-11-16T15:20:36 | 251,088,621 | 0 | 0 | MIT | false | 2023-05-10T01:56:30 | 2020-03-29T17:17:49 | 2022-10-21T13:01:27 | 2023-05-10T01:56:29 | 2,076 | 0 | 0 | 14 | Python | false | false | # Generated by Django 2.2.6 on 2020-02-25 20:23
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | UTF-8 | Python | false | false | 1,827 | py | 70 | 0001_initial.py | 64 | 0.568692 | 0.550082 | 0 | 42 | 42.5 | 255 |
JasonOwenss/pyforum | 7,670,811,592,752 | 9cdb94bd59321d3cc221f1d617c3f79da0d30656 | e42052c97a2026f51a129079780f4ad1c3d50e31 | /pyforum/Forum_project/admin.py | 2ff1f603ee64a4d3c1871fdc27bcd930e6db1f43 | [] | no_license | https://github.com/JasonOwenss/pyforum | 20c79041d6a2d2280b1283d74031bacbf9b26aca | bec7b483eb1b76caaea8651a384d6983e23cf9e1 | refs/heads/master | 2020-04-11T06:42:17.957727 | 2018-12-15T05:54:20 | 2018-12-15T05:54:20 | 161,588,835 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import admin
from .models import Forum,Comment
admin.site.register(Forum)
admin.site.register(Comment)
# Register your models here.
| UTF-8 | Python | false | false | 161 | py | 11 | admin.py | 6 | 0.770186 | 0.770186 | 0 | 7 | 21 | 33 |
eggplantisme/NetworkEvolution | 18,571,438,608,043 | 9662915257f1029593beea63d9d297e7a319f2f7 | dfbbd8bbf0d364475ab3eee67ba858c9604af4ff | /_EdgeSort_.py | ca4a5c8b7357f1997ed36c647ddf6c48fdf0d2cb | [] | no_license | https://github.com/eggplantisme/NetworkEvolution | 3dfaffa8a4c2558235084e7dab350caaef2a58b8 | fcb01afd52f8f0726af9cca2f260da0e571f723f | refs/heads/master | 2020-11-27T11:25:11.592186 | 2019-12-21T12:04:17 | 2019-12-21T12:04:17 | 221,919,968 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import random
import numpy as np
import math
import matplotlib.pyplot as plt
import matplotlib as mpl
import time
import pickle
import os
from scipy import optimize
from getEdgeTime import get_all_edge_time
from getFeatureJudge import get_feature_dict
from getNet import get_mat
import _EnsembleJudge_
import getEdgePair... | UTF-8 | Python | false | false | 12,506 | py | 211 | _EdgeSort_.py | 27 | 0.537684 | 0.526654 | 0 | 302 | 38.629139 | 137 |
info9117/BlueGarden_Project | 6,322,191,881,208 | caac4e35dc18f93a9f34d425689041e76aef90c2 | 91754e5c7252806a723e7e060a7a8b2beb0e72ad | /models/unit.py | bb62845953b54bb5e2af553d5c7d4e3fa996f315 | [] | no_license | https://github.com/info9117/BlueGarden_Project | e0ce7f0ff0b68eed6297abc25c7405d383665579 | b85f0a7ba610e580f9c2da3d25b69421cd9373fe | refs/heads/master | 2020-12-11T03:34:19.589083 | 2016-06-02T03:55:49 | 2016-06-02T03:55:49 | 56,494,085 | 2 | 6 | null | true | 2016-05-30T10:35:45 | 2016-04-18T09:19:07 | 2016-05-16T06:26:17 | 2016-05-30T10:35:44 | 16,044 | 2 | 4 | 16 | JavaScript | null | null | from shared import db
class Unit(db.Model):
__tablename__ = 'units'
id = db.Column('id', db.Integer, primary_key=True)
name = db.Column('name', db.String(10), unique=True, nullable=False)
def __init__(self, name):
self.name = name
| UTF-8 | Python | false | false | 258 | py | 60 | unit.py | 29 | 0.616279 | 0.608527 | 0 | 10 | 24.8 | 72 |
KristianHolsheimer/blog | 10,617,159,156,342 | c719dc06839b997e5a64a411b8e5137ab6047e53 | 0df842d52ff3c51da3ac641ecca50bfe85543ee8 | /posts/views.py | cbefd69c0c9841f0d1946e3f24361e80ac64bda3 | [] | no_license | https://github.com/KristianHolsheimer/blog | aa8712b0dac4073cb2a49447d43b76a7069254d7 | f9b932e07018a65dc85759d15d1dff83a5f0d903 | refs/heads/master | 2021-07-09T12:20:33.594136 | 2020-07-07T01:35:53 | 2020-07-07T01:35:53 | 155,557,569 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | import logging
from django.shortcuts import render, get_object_or_404
from .models import Post, Tag
logger = logging.getLogger(__name__)
def log_request(view):
def view_that_also_logs(request, *args, **kwargs):
logger.debug('request.__dict__', extra={'request': request.__dict__})
return view(req... | UTF-8 | Python | false | false | 1,190 | py | 44 | views.py | 22 | 0.676471 | 0.667227 | 0 | 36 | 32.055556 | 103 |
kojicz983/talkabout | 18,537,078,884,271 | 630dfca405f5a799ef79a94f175df3f48b54c471 | 051fcc3bc7e8acaeb48d9111b91d73152bf2aac2 | /talkabout/apps/cruises/ports/apps.py | 18c4d4c458da0af9cba4fe4bb2dbbb42a3accece | [] | no_license | https://github.com/kojicz983/talkabout | 901174af9dbe1e9f9ad050b5aa21a4700d482d21 | 2dfec7df6f7d1bdec9f7d16cc77f489b34784786 | refs/heads/master | 2018-12-31T03:43:54.728735 | 2018-12-23T21:19:03 | 2018-12-23T21:19:03 | 84,946,971 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.apps import AppConfig
class PortsConfig(AppConfig):
name = 'talkabout.apps.cruises.ports'
| UTF-8 | Python | false | false | 108 | py | 137 | apps.py | 106 | 0.768519 | 0.768519 | 0 | 5 | 20.6 | 41 |
wfeng1991/learnpy | 8,263,517,119,961 | 12bd3a7623119dece020e20903a68f7e259071d9 | e2ae5c6d1d3ff9c512d526b1b4d7d7b64d50e87d | /py/leetcode/67.py | 31e8057c7b137a496a027163d4d65652fad090ea | [] | no_license | https://github.com/wfeng1991/learnpy | 59ed66d0abc2947c2f73c0bfe3901ef45ba5eb56 | e5b018493bbd12edcdcd0434f35d9c358106d391 | refs/heads/master | 2021-01-23T07:35:08.376547 | 2018-09-28T02:16:31 | 2018-09-28T02:16:31 | 86,430,476 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | class Solution(object):
def addBinary(self, a, b):
"""
:type a: str
:type b: str
:rtype: str
"""
la=len(a)
lb=len(b)
if la<lb:
return self.addBinary(b,a)
a=a[::-1]
b=b[::-1]
i = 0
carry=0
r=''
... | UTF-8 | Python | false | false | 814 | py | 301 | 67.py | 300 | 0.32801 | 0.29484 | 0 | 36 | 20.916667 | 42 |
barlettacarmen/Smile | 18,227,841,214,243 | 617440d59c5855b8ed8b2c6de55ae9dae991e4ab | 0418fae22897f0015b92b58069a33b275b60c73a | /Smile/files/server.py | 87652f11bd0ee27771929afc3abc520528e7cfeb | [
"BSD-3-Clause",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-other-permissive",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | https://github.com/barlettacarmen/Smile | c8ed255ec96582a7853038c479bf82b1bbff58e2 | 1b5618d61ca272cf3f26ba19a7098d1e3a8a2db6 | refs/heads/master | 2021-01-11T20:08:01.523628 | 2017-12-19T14:48:01 | 2017-12-19T14:48:01 | 79,045,207 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # ___
# / /\
# /___/ \
# \___\ /_ \_\_\_
# / /\\/ /| \_
# /___/ \_/ | \_\_\_ \_ \_ \_ \_ \_\_\_
# \ \ / \ | \_ \_\_\_ \_ \_ \_\_
# \___\//\_\| \_\_\_ \_ \_ \_ \_\_\_ \_\_\_
# /___/ \
# \ \ /
# \___\/
#
# Copyrig... | UTF-8 | Python | false | false | 8,410 | py | 5 | server.py | 2 | 0.531034 | 0.501189 | 0 | 294 | 27.581633 | 104 |
cashila/block-exploder | 19,207,093,768,461 | 3bf9cc1d3d49b7885ccd40e2288ee48620917b5e | 0918cc441ad199a86ed9879ff6dace165de3b40e | /syncer/serializers.py | e83c5ade38add54d45758031f9ceba171811379d | [] | no_license | https://github.com/cashila/block-exploder | b97c47b147f6463f0966e9d8c4ebf06c510b57e8 | 1ac611a4adc1c114b7ab09f81d3f9aaf27e39490 | refs/heads/master | 2021-01-23T09:38:20.025755 | 2017-08-21T16:13:45 | 2017-08-21T16:13:45 | 102,586,814 | 0 | 1 | null | true | 2017-09-06T09:00:01 | 2017-09-06T09:00:01 | 2017-06-17T03:17:14 | 2017-08-23T19:31:12 | 2,271 | 0 | 0 | 0 | null | null | null | class VoutSerializer(object):
@staticmethod
def to_database(vout):
return {
"value": vout.value,
"asm": vout.asm,
"addresses": vout.addresses,
"type": vout.type,
"reqSigs": vout.reqSigs,
"spent": vout.spent
}
class VinSeri... | UTF-8 | Python | false | false | 3,558 | py | 37 | serializers.py | 18 | 0.517426 | 0.517144 | 0 | 138 | 24.782609 | 80 |
bellancal/CAN_Invader | 7,782,480,751,348 | d77df5bffa552c2f0ae8e6757dbfc5cfd67c927c | 80d7b43447fea4755987124c1a7cd4993d1840f5 | /bg.py | 489745faca45b1f1c32587748507dc597157929a | [] | no_license | https://github.com/bellancal/CAN_Invader | 686e2bdf0b136c781adad8d4a340033e6f86360f | c2892e3ab1e906e289459faa221620f1624c8652 | refs/heads/master | 2020-04-05T23:08:45.960723 | 2018-02-23T22:56:59 | 2018-02-23T22:56:59 | 58,976,285 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null | from tkinter import *
import tkinter.messagebox
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.font as font
import subprocess
from subprocess import Popen, CREATE_NEW_CONSOLE, PIPE
import os
import ConfigFile
import configparser
import socket
import sys
import threading
import traceback
"""
Purpose: Mai... | UTF-8 | Python | false | false | 98,249 | py | 31 | bg.py | 6 | 0.626276 | 0.606988 | 0 | 2,395 | 40.022547 | 332 |
twcannon/MSDataSci | 16,844,861,757,753 | 7d7bb2f0bff956a4cd9ba2cc8040f5419fdb53d9 | d11fefd843ba5f3909871c8ec64e36b4bd2f37c3 | /DATA505/projects/P1_cannon.py | 2d0bc5a049dd49c78c8120b0cae4a61c843599ce | [] | no_license | https://github.com/twcannon/MSDataSci | d7065ff16537c23c2a29a95e2f79565cd15df4b0 | 443ef45cf6594f61ae35ad16c62b040c9386e2c2 | refs/heads/master | 2023-07-19T02:14:09.665138 | 2020-05-22T14:10:48 | 2020-05-22T14:10:48 | 195,902,104 | 0 | 0 | null | false | 2023-07-06T21:42:00 | 2019-07-09T00:06:58 | 2020-05-22T14:11:08 | 2023-07-06T21:41:59 | 163,298 | 0 | 0 | 6 | Python | false | false | import numpy as np
from scipy import spatial
import matplotlib.pyplot as plt
debug = False
sample_data = np.genfromtxt('501/data/project_one/TABLE2.csv', delimiter = ',')
print('Sample Data: \n'+sample_data) if debug else next
doc_labels = ['cl','c2','c3','c4','c5','m1','m2','m3','m4']
terms = ['human','interface... | UTF-8 | Python | false | false | 3,776 | py | 119 | P1_cannon.py | 56 | 0.594809 | 0.560911 | 0 | 155 | 23.329032 | 114 |
ai-how/inputpipeline | 16,621,523,476,876 | 88aefd88adf40c1e5fbcb1167b8e783fd0437f6f | 6cae1cf0fe184febfd6cea2ced593108bc65c30a | /input.py | 3cd930e1086223d3851e194385cbeb2adb9fb123 | [] | no_license | https://github.com/ai-how/inputpipeline | 348e75610a3a28b7e4799f122b67243b95c4617e | c2c7cce16b9d5c1dfb27265184ab706b9b1ec584 | refs/heads/master | 2021-05-10T21:18:59.341871 | 2018-01-20T09:44:48 | 2018-01-20T09:44:48 | 118,225,274 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import tensorflow as tf
import threading
##================================================##
## good practice to limit data processing to CPU ##
##================================================##
def return_batch(train, list_of_columns):
with tf.device("/cpu:0"):
train = train.sample(frac=1).reset_index(drop... | UTF-8 | Python | false | false | 3,141 | py | 2 | input.py | 1 | 0.484559 | 0.474053 | 0 | 68 | 45.191176 | 111 |
mohnish-gobo/ifog_light_hue | 1,554,778,176,644 | 5fff5c58814f2d301871addd5f98f419a4dfeccf | 6e2344a342577b51faefcc30f762be675d4209ab | /app.py | 70b67450392c888d1f6e8baabb67c4d44e12c799 | [
"Apache-2.0"
] | permissive | https://github.com/mohnish-gobo/ifog_light_hue | 99bb82955b136117a0ad2a3b0ec99df37912e2e1 | 03a21fe05193b958c0a68b8d5e72c14a9a6abd15 | refs/heads/master | 2020-06-20T10:21:25.512204 | 2016-11-28T18:32:51 | 2016-11-28T18:32:51 | 74,871,122 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
import urllib
import json
import os
import requests
from flask import Flask
from flask import request
from flask import make_response
# Flask app should start in global layout
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook():
req = request.get_json(silent=True,... | UTF-8 | Python | false | false | 2,248 | py | 2 | app.py | 1 | 0.578292 | 0.561388 | 0 | 100 | 21.48 | 100 |
snaiperx8/pizza | 4,217,657,892,271 | 7e3e6e6caafd376f2949cf50338d17de94799dd8 | 437f47b9420c9dbdcb519e8f2187a0ba2c8bf52f | /pizza/urls.py | fc84cbba56f50e647bc0ad84b4296bae968ba9c0 | [] | no_license | https://github.com/snaiperx8/pizza | e38d4b2f8c117ade62d70591db2394b4393ac723 | cc84b724126b202962f3e72d4ad802dcd015018c | refs/heads/master | 2020-03-31T18:43:23.841093 | 2018-10-18T06:30:34 | 2018-10-18T06:30:34 | 152,470,036 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | from django.contrib import admin
from django.urls import path
from django.conf.urls.static import static
from django.conf import settings
from authenticate_app.views import login_view, logout_view, signup_view, home
urlpatterns = [
path('admin/', admin.site.urls),
path('', home, name = 'home-url'),
pat... | UTF-8 | Python | false | false | 571 | py | 10 | urls.py | 7 | 0.704028 | 0.704028 | 0 | 16 | 34.6875 | 77 |
chenxuhl/Nestnet | 8,349,416,426,807 | 14d43eca9c8436281455149947c43a56e8973027 | aa1621bae671a34b5ec4ad3ece918301bd9ba276 | /main.py | 31d408936d0532ad515d38b02f37befbf8c4f323 | [] | no_license | https://github.com/chenxuhl/Nestnet | 982abc0c56e702d22870641f8c318459492462e3 | 848a834cca3556cafb5578123fdb1017be7d4467 | refs/heads/master | 2020-09-01T11:23:36.610791 | 2020-07-25T14:07:41 | 2020-07-25T14:07:41 | 218,949,081 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding:utf-8 -*-
# Author : Ray
# Data : 2019/7/25 2:15 PM
from data import *
from model import *
import warnings
warnings.filterwarnings('ignore')
# os.environ['CUDA_VISIBLE_DEVICES'] = '0'
aug_args = dict(
rotation_range = 0.2,
width_shift_range = 0.05,
height_shift_range = 0.05,
shear_range... | UTF-8 | Python | false | false | 2,059 | py | 5 | main.py | 4 | 0.557248 | 0.534644 | 0 | 61 | 32.327869 | 112 |
CesarAcjotaMerma/Ecommerce_Django | 12,309,376,312,897 | 316f9f3373c6fc275801353d9cb1b4ef818c38fd | 389ea3bca435e9599d078e532ec5a18cf3a84f7a | /myvenv/Scripts/django-admin.py | 66101ab997c60d6779d3c0fe618c96c03f89d48a | [] | no_license | https://github.com/CesarAcjotaMerma/Ecommerce_Django | 7d086925d4a7d75fd3fb4d3c9f22bdf21c1f5c30 | 2b7df2dc861952bb04d369f5b3e5df83a13aa98c | refs/heads/master | 2023-07-11T18:06:54.514752 | 2021-08-03T04:28:55 | 2021-08-03T04:28:55 | 392,185,181 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!c:\users\usuario\documents\4to semestre\pasantia\pasantia_proyecto\myvenv\scripts\python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| UTF-8 | Python | false | false | 201 | py | 7 | django-admin.py | 4 | 0.751244 | 0.746269 | 0 | 5 | 39.2 | 94 |
rahasayantan/Work-For-Reference | 2,001,454,774,352 | a78b357ebbe4fcce09c9b793c13cab222a193f6f | 9c094456139fe0fb55621a6a230a37a03024800c | /others/stepwiseResults.py | 5bb7c9b3a91bd8aeb1e1db2afa00d8b23520104a | [
"MIT"
] | permissive | https://github.com/rahasayantan/Work-For-Reference | 3989169935b1f6d246717eab800112d1dccf329d | e052da538df84034ec5a0fe3b19c4287de307286 | refs/heads/master | 2022-01-15T05:48:17.226826 | 2019-07-03T11:31:36 | 2019-07-03T11:31:36 | 155,310,696 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | import pandas as pd
import numpy as np
import datetime as dt
import gc
from sklearn.preprocessing import MinMaxScaler
from encoding import cat2MeanShiftEncode
from sklearn.externals import joblib
from stepwiseSelectionRegression import stepwiseOLS
'''
dftrainStat = joblib.load("../input2/trainStat33.pkl")
dftrainStat2... | UTF-8 | Python | false | false | 2,017 | py | 102 | stepwiseResults.py | 47 | 0.790283 | 0.76351 | 0 | 39 | 50.615385 | 269 |
ictsc/prep-pstate | 12,687,333,404,592 | 30a857664fcefce102181a9ce286bdfd059b8b13 | 310509a07e7c30cf60e82d20f06acb35088c70a3 | /ictsc_prep_school/pstate/migrations/0019_auto_20190801_1405.py | 7a62601b2b3a853babdc70e3fb741e54276260f7 | [] | no_license | https://github.com/ictsc/prep-pstate | 69ce346ec5c63f9e86a79c44c700f6365877ee50 | afcd3c53a292b9a20ae2e2c9e480197b0bc11255 | refs/heads/master | 2023-03-09T08:36:09.768824 | 2020-10-14T15:52:50 | 2020-10-14T15:53:06 | 154,928,737 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Generated by Django 2.0.4 on 2019-08-01 05:05
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('pstate', '0018_auto_20190801_1314'),
]
operations = [
migrations.AddField(
... | UTF-8 | Python | false | false | 1,014 | py | 138 | 0019_auto_20190801_1405.py | 76 | 0.606491 | 0.539554 | 0 | 30 | 31.866667 | 156 |
sdpython/mlstatpy | 8,186,207,704,607 | c5d98b42fb158c841886e1cc75bf29e36bf88aa1 | ac768a35cc145185aa940bbb8255c40ec38a7c6f | /mlstatpy/ml/_neural_tree_node.py | 2d4828028b353ed99c658afdc60292a6fdd9fc88 | [
"MIT"
] | permissive | https://github.com/sdpython/mlstatpy | 3dcb2629773c25bb5256b0568932b6753b3c4068 | 572e0de91bfe02857fc8594ba0ad8ee3ecf9f6e2 | refs/heads/main | 2023-08-17T11:06:14.258773 | 2023-08-05T22:35:27 | 2023-08-05T22:35:27 | 61,439,492 | 10 | 10 | MIT | false | 2023-08-05T22:35:29 | 2016-06-18T15:21:42 | 2023-07-19T20:41:36 | 2023-08-05T22:35:28 | 37,030 | 9 | 8 | 12 | Jupyter Notebook | false | false | # coding: utf-8
import numpy
import numpy.random as rnd
from scipy.special import expit, softmax, kl_div as kl_fct # pylint: disable=E0611
from ._neural_tree_api import _TrainingAPI
class NeuralTreeNode(_TrainingAPI):
"""
One node in a neural network.
:param weights: weights
:param bias: bias, if N... | UTF-8 | Python | false | false | 12,509 | py | 213 | _neural_tree_node.py | 62 | 0.530658 | 0.520985 | 0 | 401 | 30.194514 | 86 |
Street-King/python_primer | 6,227,702,582,196 | b4e1a33a26129103a70a79e2f7da181a010e2b55 | 24557755f44c18b36f10f81b6341cf1edfc2ede8 | /ch_3/L3_flexible.py | 22b5f262abeadb44dcd463596d18336873d8d88f | [
"MIT"
] | permissive | https://github.com/Street-King/python_primer | 5e81472bed340812a38619a50d555bb545c29ef1 | 211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0 | refs/heads/master | 2020-03-30T15:49:30.349229 | 2017-01-03T12:42:23 | 2017-01-03T12:42:23 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # Exercise 3.31
# Author: Noah Waterfield Price
def L3(x, n=None, epsilon=None, return_n=False):
if (n is None and epsilon is None) or \
(n is not None and epsilon is not None):
print 'Error: Either n or epsilon must be given (not both)'
term = x / (1. + x)
s = term
if n is not None... | UTF-8 | Python | false | false | 1,051 | py | 95 | L3_flexible.py | 84 | 0.551855 | 0.452902 | 0 | 37 | 27.405405 | 67 |
logithr/djangocms-widgetbox | 7,430,293,457,167 | d1d6d4e222522348147e1e89c8dfa827cdded6f6 | 988c07ae1de971b877a5250ac7dc821c0e96a972 | /widgetbox/migrations/0005_rename_model_button.py | f9a93dcb16d388fee59b9ec27d675529c6673f80 | [
"MIT"
] | permissive | https://github.com/logithr/djangocms-widgetbox | 31c7a52bf6628dffde7868dfc2d7f0da3937f079 | dbafb9b70f7795de5eb94447b7703cba3bd73f84 | refs/heads/master | 2020-12-24T14:10:44.469017 | 2016-03-08T09:53:57 | 2016-03-08T09:53:57 | 35,680,909 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('widgetbox', '0003_auto_20150522_0959'),
]
operations = [
migrations.RenameModel('ButtonPlugin', 'Button'),
migration... | UTF-8 | Python | false | false | 495 | py | 35 | 0005_rename_model_button.py | 21 | 0.660606 | 0.626263 | 0 | 18 | 26.5 | 69 |
n8felton/AoC2020 | 10,411,000,768,425 | 868f54f35221d4789f65a07ff1f013108aa6dc01 | 5a1a876c76edbc5189793285f2c6e6fd970091d0 | /day04/0401.py | 9e01b1eae324770369697045768c4546ad430514 | [] | no_license | https://github.com/n8felton/AoC2020 | d0a5ca1c9c03a78149dbf0806b1ba5eb2812d4f5 | 1c46df2b4099ea2786e5626cf986dea026e6025f | refs/heads/main | 2023-01-28T15:27:43.498117 | 2020-12-05T05:39:58 | 2020-12-05T05:39:58 | 318,567,649 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python3
required_fields = sorted(["byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid", "cid"])
temp_required_fields = sorted(["byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"])
passports = []
valid_passports = []
with open("input_0401") as input:
passport = []
for line in input:
if not lin... | UTF-8 | Python | false | false | 811 | py | 4 | 0401.py | 4 | 0.574599 | 0.567201 | 0 | 30 | 26.066667 | 82 |
lwoloszy/personal_website | 6,150,393,195,128 | f3fc5905fe6ff72d8c94a417fa3332ebe7a1e181 | 23664e1ab68292a2604b549f60feb7bf5c4d5ae6 | /pelicanconf.py | 18e8f4c1d147e0c2ecdcf3b2fd3b90011a94a3ed | [] | no_license | https://github.com/lwoloszy/personal_website | 9e88dfd08a736df16417ef2a7fddbbec0f1ecc53 | 6021ab888d583418943689250f4cc38f6cfb764b | refs/heads/master | 2020-12-24T05:12:47.176650 | 2016-10-22T00:10:27 | 2016-10-24T16:51:41 | 61,959,055 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
AUTHOR = u'Luke Woloszyn'
SITEURL = u'http://lukewoloszyn.com'
SITENAME = u'Luke Woloszyn'
SITESUBTITLE = u'data scientist, outdoor enthusiast, music lover, sports fan'
ARTICLE_URL = '{date:%Y}/{date:%m}/{date:%d}/{slug}.html'
ART... | UTF-8 | Python | false | false | 1,388 | py | 6 | pelicanconf.py | 1 | 0.669308 | 0.665706 | 0 | 56 | 23.785714 | 77 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.