blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
518c5332f32f0787a8be896f38515bcca41b6b80 | e0ed728182d4dbb65c87e07b9149a35d6fea419b | /mrcal-triangulate | 04442543a75bcd926985cdc944c9ce6a3083c045 | [
"Apache-2.0"
] | permissive | gmke/mrcal | e895c1d18bc1d9df6272275027d32ada74a0dfb6 | 097acba1f5730b34a45b61b8937441f548699077 | refs/heads/master | 2023-05-28T23:05:18.700208 | 2023-05-08T20:08:45 | 2023-05-08T20:08:45 | 368,556,670 | 0 | 0 | Apache-2.0 | 2021-05-18T14:16:58 | 2021-05-18T14:16:57 | null | UTF-8 | Python | false | false | 37,974 | mrcal-triangulate | #!/usr/bin/python3
# Copyright (c) 2017-2023 California Institute of Technology ("Caltech"). U.S.
# Government sponsorship acknowledged. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | |
a39919adad5e72984c75f0d3f01436dd006608ea | 22e6dcbebad329b32579e531af8b33bc657088c9 | /AtCoder/ABC112/ProbD.py | 1861ccefcd5473dedd3a0a73b16302d793bfb2fb | [] | no_license | daigo0927/ProgrammingContest | a63b74bb79ece46181b03dc359bf665604b11ea5 | f54aa8f485ebfd30d5ee84fd74fa9e0661c2a7df | refs/heads/master | 2021-06-21T09:26:23.699668 | 2019-06-22T18:51:32 | 2019-06-22T18:51:32 | 132,655,624 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 274 | py | ProbD.py | n, m = list(map(int, input().split()))
cands = []
for i in range(1, int(m**(1/2))+1):
if m%i == 0:
cands.append(i)
cands.append(m//i)
cands = sorted(cands, reverse = True)
# print(cands)
for c in cands:
if m//c >= n:
print(c)
break
|
74ff90cc512cbc88b33cc8043ad9dae6c641abb2 | 2c5913b150f2abb69fd69512f2fa516f95cf1e1c | /pycep/tokenizer.py | 29eedc1bc8a0b83b4ef1d9ee9ad84a37688df076 | [] | no_license | dlorch/pycep | 1092a7a7c9c58e46ff8473dc6349438d014b5120 | 0abbdc2b718dd5d51a8f5950cd2328f1d2f04065 | refs/heads/master | 2023-08-10T23:22:36.311742 | 2023-07-25T18:11:46 | 2023-07-25T18:11:46 | 26,962,234 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 906 | py | tokenizer.py | import tokenize
def generate_tokens(readline):
"""The tokenizer takes a file handle containing the source code as an input
and returns a sequence of tokens.
>>> import pycep.tokenizer
>>> from StringIO import StringIO
>>> tokens = pycep.tokenizer.generate_tokens(StringIO('print "Hello, world!"').r... |
bd4664c6af091768f00ebd21f543aa5a4114bdb8 | 86f07739152b6bcaffcb54725a30022b5af762b9 | /Tinder/dbhelper.py | 8d4b5e1600582ba1f859e374489281059a3dc151 | [] | no_license | AnushkaBhadra1551/Tinder-App | f0850335f1748a051ab7040eafea03ab7ea1b0ba | 22dbef7a67a0abd3fed6820f5c6ac89a914e7ba2 | refs/heads/master | 2023-02-13T00:39:13.117467 | 2021-01-13T16:10:17 | 2021-01-13T16:10:17 | 329,360,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,519 | py | dbhelper.py | import mysql.connector
class DBHelper:
def __init__(self):
# connect to the database
try:
self.conn = mysql.connector.connect(host="localhost",user="root",password="",database="tinder")
self.mycursor=self.conn.cursor()
print("Database connection successful")
... |
5ac3fb46b86acaae059f43244263f15f6032b6a4 | 37c677551f6b11fb6ec93c35d45c8f52d9b483a0 | /__init__.py | 5432efda49f68e4c179a83c824a69a0fe8e3315e | [] | no_license | 70akaline/nested_scripts | 735e1ee5868596a80633d5b1d1c36ce5bb95c9d1 | c69306bd51fda90fd04b33e6f72f2b6d6edfcef1 | refs/heads/master | 2021-09-05T23:23:16.165209 | 2018-01-31T16:09:16 | 2018-01-31T16:09:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 435 | py | __init__.py | #from calculations import *
#from data_types import *
#from data_types import mats_freq
#from data_types import IBZ
#from data_types import basic_data
#from data_types import bosonic_data
#from data_types import fermionic_data
#from data_types import edmft_data
#from data_types import GW_data
#from data_types import tr... |
9801e04a09b76a9ca99ff427e2cc8ae6047a3fa9 | ed1ccf5d9b6783eea310e2dc9a83fad0bbf95cc2 | /nlp_processing/words2vector.py | b043c8a4cc747c60071dc47b1b57cba88d44df38 | [] | no_license | anxiang1836/dianping_nlp | 5a95aa72bad321aaacc5b000673fb3fd37ec6e8a | e830d12ebdf6303997a240f8fbfa1a5f29d91a21 | refs/heads/master | 2020-06-01T07:55:00.073799 | 2019-06-07T15:55:00 | 2019-06-07T15:55:00 | 190,708,093 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,975 | py | words2vector.py | """
words2vector的主要功能是:为菜品的分词后的结果转化为vector
@Author by MaxMa 2019.05.22
"""
import gensim
class WordsDict2Vec:
def __init__(self):
self.model = gensim.models.Word2Vec.load(
'/Users/maxma/Documents/nlp/word2vec_trained/baike_26g_news_13g_novel_229g.model')
print('word2vec模型加载完成!')
... |
52eb0a09e3b6a5ad0cb3327a6191388d43d3c36b | b7b243902150a1aa5b774523ac01d7016de13477 | /cyc/math/415.py | f65accdf54381cec526ff5ac4d819c6ba59b67ad | [] | no_license | Veraph/LeetCode_Practice | 7e97a93464911a1f33b3133043d96c88cd54016a | eafadd711f6ec1b60d78442280f1c44b6296209d | refs/heads/master | 2023-03-23T11:49:19.046474 | 2021-03-18T02:22:50 | 2021-03-18T02:22:50 | 273,317,388 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 529 | py | 415.py | # 415.py -- Add Strings
'''
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2.
'''
def addStrings(num1, num2):
'''
same with 67
'''
carry = 0
res = ''
num1 = list(num1)
num2 = list(num2)
while num1 or num2 or carry:
if num1:... |
8bb06344ef3982e9c305c46e8c81691497a24e6d | d41b1a78dd7a26344a4cbe3f837aee4f04763d99 | /projects/ancestor/ancestor.py | e6bf6d4048e163b9787e1772094c1fa20e249a1b | [] | no_license | samirgadkari/Graphs | e2f6232270eb627fec9d47ca722b210742fe86e7 | 9d26627ea40f6730abbd28ff51b76b383305c3a0 | refs/heads/master | 2020-06-04T23:56:47.401308 | 2019-06-21T19:18:31 | 2019-06-21T19:18:31 | 192,241,798 | 0 | 0 | null | 2019-06-21T19:18:32 | 2019-06-16T22:16:27 | Python | UTF-8 | Python | false | false | 4,596 | py | ancestor.py | import sys
sys.path.insert(0, '../graph')
from util import Stack
class Node:
def __init__(self, v):
self.value = v
self.parents = []
self.children = []
# def __hash__(self):
# return self.v
# def __eq__(self, other):
# return other.value == self.value
def chi... |
edfc5fefac9499ec380ba7060c08d8a2ffcbfb13 | c01358f7a7f2eb4b13b2b87a01f86dfed06ffa90 | /tests/test_geometry.py | af7b68d7ba90f588b69359ae61576a1a6df2a50a | [
"MIT"
] | permissive | fusion-energy/openmc-dagmc-wrapper | eb26983ec5d911a37beed677ec7638b78b438747 | 679130cad8ede53728416e39bb5fdc8582151b3d | refs/heads/main | 2023-08-17T08:18:49.925836 | 2023-08-15T13:47:33 | 2023-08-15T13:47:33 | 379,060,922 | 3 | 3 | MIT | 2022-03-07T23:13:40 | 2021-06-21T20:57:28 | Python | UTF-8 | Python | false | false | 3,128 | py | test_geometry.py | import tarfile
import unittest
import urllib.request
from pathlib import Path
import openmc
import openmc_dagmc_wrapper as odw
class TestSettings(unittest.TestCase):
"""Tests the geometry.py file functionality"""
def setUp(self):
if not Path("tests/v0.0.2.tar.gz").is_file():
url = "http... |
630348d7c4da1ba6f4acade118e77ff15b227d70 | e97dc960a5e3a5daa9259fe965c87846f7432997 | /ex.10(lab2).py | 6a14f1b8ff2c99c81252a979a0d92e6c8f013d63 | [
"MIT"
] | permissive | Maria-Lasiuta/geegs_girls-Lab2 | bcc9d59f1824d80af165bb55e60042ed7041078f | c4dcb8c77f1ba13b9b56edc9ab0e52ef2003448b | refs/heads/main | 2023-08-14T05:16:52.409550 | 2021-09-21T20:11:28 | 2021-09-21T20:11:28 | 403,537,591 | 0 | 0 | MIT | 2021-09-21T20:11:29 | 2021-09-06T08:07:26 | Python | UTF-8 | Python | false | false | 365 | py | ex.10(lab2).py | from datetime import date,timedelta
d1 = date(int(input('year1 ')), int(input('month1 ')), int(input('day1 ')))
d2 = date(int(input('year2 ')), int(input('month2 ')), int(input('day2 ')))
day_generator = (d1 + timedelta(x + 1) for x in range((d2 - d1).days))
# generate all days from d1 to d2
print (sum(1 for day... |
d5a002c9913e9798eb55e2e9d62553e8901364eb | 53eee7eb899cb518983008532257037fb89def13 | /1817.finding-the-users-active-minutes.py | a5201fe4ca77ce63275283dc002b68c95c1a720d | [] | no_license | chenxu0602/LeetCode | 0deb3041a66cb15e12ed4585bbe0fefce5dc6b26 | 3dc5af2bc870fcc8f2142130fcd2b7cab8733151 | refs/heads/master | 2023-07-05T19:26:21.608123 | 2023-07-02T08:35:35 | 2023-07-02T08:35:35 | 233,351,978 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,619 | py | 1817.finding-the-users-active-minutes.py | #
# @lc app=leetcode id=1817 lang=python3
#
# [1817] Finding the Users Active Minutes
#
# https://leetcode.com/problems/finding-the-users-active-minutes/description/
#
# algorithms
# Medium (78.10%)
# Likes: 12
# Dislikes: 0
# Total Accepted: 4.4K
# Total Submissions: 5.7K
# Testcase Example: '[[0,5],[1,2],[0,2]... |
901527cfde9091b69dd3a350f3604a34a6fb15dd | 76ca52991ca1a1e50d066e9f7c4827b6a4453414 | /tools/aapt2/tools/public_attr_map.py | 92136a8d9acdd7a33166fe20bfb749b37d5946d0 | [
"Apache-2.0",
"LicenseRef-scancode-unicode"
] | permissive | ResurrectionRemix/android_frameworks_base | 3126048967fa5f14760664bea8002e7911da206a | 5e1db0334755ba47245d69857a17f84503f7ce6f | refs/heads/Q | 2023-02-17T11:50:11.652564 | 2021-09-19T11:36:09 | 2021-09-19T11:36:09 | 17,213,932 | 169 | 1,154 | Apache-2.0 | 2023-02-11T12:45:31 | 2014-02-26T14:52:44 | Java | UTF-8 | Python | false | false | 1,563 | py | public_attr_map.py | #!/usr/bin/env python
import sys
import xml.etree.ElementTree as ET
def findSdkLevelForAttribute(id):
intId = int(id, 16)
packageId = 0x000000ff & (intId >> 24)
typeId = 0x000000ff & (intId >> 16)
entryId = 0x0000ffff & intId
if packageId != 0x01 or typeId != 0x01:
return 0
levels = ... |
baf8b5ae4b403871fd754a6c1c7d3b7a30986716 | 180bf8dd3557b668fc6bec06e13ecd97b33b3c0a | /Minjae/2021-02-20--02-21/2133_fillingtiles.py | c70ac7c6694493ad3fa48ce87cd4b83f670e4161 | [] | no_license | Taein2/PythonAlgorithmStudyWithBOJ | bb01daeb9f351c323c83efb4126af6f447f44890 | 5e0b84094555dd2463f0f1f1076ddcdcf3f4111c | refs/heads/master | 2023-03-21T11:49:32.082512 | 2021-03-16T15:18:30 | 2021-03-16T15:18:30 | 335,157,274 | 2 | 2 | null | null | null | null | UTF-8 | Python | false | false | 339 | py | 2133_fillingtiles.py | # dp[i][0] 위나 아래 하나
# dp[i][1] 위두개나 아래 둘
# dp[i][2] 풀
n= int(input())
dp= [[0]*3 for _ in range(max(n,2)+1)]
dp[1][0]=0
dp[1][1]=2
dp[1][2]=0
dp[2][0]=2
dp[2][1]=0
dp[2][2]=3
for i in range(3,n+1):
dp[i][0]= dp[i-1][1]
dp[i][1]=dp[i-1][2]*2+dp[i-1][0]
dp[i][2]=dp[i-2][2]+dp[i][0]
print(dp[n][2])
|
1325c492118274a7b9a4b2a31c67ba8d008c7399 | 1c56ac6a15f3436f7a10118076b5b346768e83bc | /bindSocketTest.py | fa83b793eb255b41d95b44d85c6bdb998599c860 | [] | no_license | boksil1657/unittest | 774a10ce725d586b119b5eb802a264453bb14a27 | 08fec8a14c6fcbdb8b4a36373f6b967a2d619793 | refs/heads/master | 2020-04-13T14:05:00.479882 | 2018-12-27T05:39:16 | 2018-12-27T05:39:16 | 163,251,006 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,885 | py | bindSocketTest.py | #!/usr/bin/env python
import unittest
import socket
import time
import sys
import random
class BindSocketTest(unittest.TestCase):
def setUp(self):
self.port = self.getRandomPort()
def getRandomPort(self):
return random.randint(10000, 65535)
# UDP AND TCP bind same port
def testUdpTcp... |
0fb19c6935d995e6e2fb82a1f6fa3816b68240fd | 379a4cfb77a2a844206aa1e3ba38c04fc2c01e67 | /python_packages-liuchao/read_ecmodel.py | c4e507a29d993d001598d94f224cb68a0b4f8952 | [] | no_license | NMC-EMC/read_file | 593d321f36ec571593cd283d6c95eeebfbc43bc1 | 7a397d8b967c7e17a024e02034736df8ad4a6be3 | refs/heads/master | 2021-03-17T08:10:12.581384 | 2020-03-13T02:58:13 | 2020-03-13T02:58:13 | 246,976,049 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,392 | py | read_ecmodel.py | #!/usr/bin/env python3
# -*- coding utf-8 -*-
#===author:liuchao
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from scipy import interpolate
import datetime
from mpl_toolkits.basemap import Basemap
import matplotlib as mpl
#======================(4)读取EC格点数据=========================... |
c85a790e2be42af3d5676f8ec48aa8a51ac07ba6 | 18f22124c2f577fac502d037d0ff305ad309f8be | /slovnik/migrations/0016_auto_20170628_2230.py | 1d2dc3e16eb331f16e7db26298f2aa93dc379673 | [] | no_license | honza-logo/logopedia | e6c9fb6b52bd86252586cc9dbbd3678174ffd393 | adbd53f6c2f1a895b1035cfeee7e5e197dd08341 | refs/heads/master | 2021-01-24T08:55:22.021189 | 2017-08-31T17:53:49 | 2017-08-31T17:53:49 | 93,398,376 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,781 | py | 0016_auto_20170628_2230.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-06-28 20:30
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('slovnik', '0015_testfourimagesitem_word_correct_position'),... |
a36f6e031a53f72be6e9fbee862d122ca9989964 | faa8116d40dafa5c712f600f25cd6f8bb49ae0a7 | /users/permissions.py | e960757117055538218c9ab4a0704b2bd070c2e0 | [] | no_license | utkarshaditya01/Virtual-Classroom | b1e55d0948c116ec3b5b0ff52ec189ffd9fd14ba | 5b6f0ac7aa972f74aeb85d96b11d40a3ddb3084d | refs/heads/main | 2023-07-12T23:21:45.171043 | 2021-08-29T14:35:33 | 2021-08-29T14:35:33 | 401,007,268 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 599 | py | permissions.py | from rest_framework.permissions import IsAuthenticated
class IsTutor(IsAuthenticated):
def has_permission(self, request, view):
if not super().has_permission(request, view):
return False
if hasattr(request.user, 'tutor') and request.user.tutor:
return True
return Fa... |
b0c946c08722cf26edf9aaa009ee72f7bd1413bb | d09fd96bbc931fbb8522e5c991973f064a4ded50 | /baxter/build/baxter_pnp_one_arm_cartesian_sim/catkin_generated/pkg.installspace.context.pc.py | 5feef0ade3f69c5cc9cd8112991da9c0239a85dc | [] | no_license | rymonyu/EE4-Robotics | b3827ba0dff5bdfdd1e47fe07a40e955c5226f38 | 6cf9272abd7fe8a074dc74a032f6e0b35edb8548 | refs/heads/master | 2020-08-22T15:09:39.706809 | 2019-12-15T23:35:45 | 2019-12-15T23:35:45 | 216,420,098 | 6 | 0 | null | null | null | null | UTF-8 | Python | false | false | 599 | py | pkg.installspace.context.pc.py | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "OpenCv;roscpp;sensor_msg/Image;rospy;rospack;baxter_core_msgs;baxter_gazebo;baxter_interface;baxter_tools;baxter_tools;gazebo_ros;gazebo_msgs"... |
516618f2168c3b43f5a209243e756cd718831d0b | e0ed72bb2c0055d1b2bade5abf7bfa5c758cdb9e | /Test/test_files.py | 5865bffd99e6e89af0d2b10ef47a7dfaa54f289a | [] | no_license | dsp6414/Pytorch-Lib | ab0b8b0d17bb040433769c54e3c45be9342c2441 | 229d55ecc4b41cfb248b47e847af3b6d199dfe43 | refs/heads/master | 2020-03-16T08:48:21.388969 | 2018-05-30T03:11:56 | 2018-05-30T03:11:56 | 132,602,490 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,224 | py | test_files.py | import _init_paths
import os
import utils
from utils.files import *
if __name__=="__main__":
file_name='.\\testData\\train.tsv'
file_path_name = os.path.abspath(file_name)
if F_file_exists(file_path_name) :
print('file existing')
name = F_get_filename_from_fpath(fil... |
ea9f2bf8b533e3a2eaac1cfa321bcd4975458f5d | b4c063896ad7f25a8197b0470421c9e1d29bf39c | /aula_14-estrutura-repeticao-while/aula_14.py | ed4e62d17b656683740a794c20a6a9b0c60b8945 | [] | no_license | derickdeiro/curso_em_video | b2aa12285b206c2380167cd90b44176fd9ec9b2e | e8c09dd125a0be441aaff8a16f5c686c54db498d | refs/heads/main | 2023-02-21T16:26:48.031261 | 2021-01-27T15:42:09 | 2021-01-27T15:42:09 | 333,450,913 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 405 | py | aula_14.py | # for i in range(1, 10):
# print(i)
# print('FIM')
#
# c = 1
# while c < 10:
# print(c)
# c += 1
# print('FIM')
n = 1
par = impar = 0
while n != 0:
n = int(input('Digite um número: '))
if n != 0:
if n % 2 == 0:
par += 1
else:
impar += 1
p... |
10715c6ea409f0fcc4d858f7ea48d68b6e7218cc | fe5d946b2425398fa3839e134da1ff58a1653275 | /ui/handlers/show_ckan.py | bc62414d4cf91b1abd82de9ff10fef0a6b68631f | [] | no_license | andygimma/edumap | a4f00ea39cb667879d6b148356527f10f3ad0fad | f794f635120c9e9d9fb2907f013bd1d7f1055995 | refs/heads/master | 2020-03-30T09:27:53.346118 | 2013-08-30T20:17:26 | 2013-08-30T20:17:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 549 | py | show_ckan.py | #import models.users_db as users_db
import jinja2
import os
import base
from google.appengine.ext.webapp import template
from workers.get_template_path import get_template_path
from workers.check_login import check_login
TEMPLATE_URI = 'ui/templates/ckan.html'
class ShowCkan(base.RequestHandler):
def get(self):
... |
99bea74c0a279fbe5ea049405aa959634866be93 | e66e3d8408685552ac511ce326dedbbe614e5d06 | /Ejercicios_Basicos/Ejercicio15.py | dde5825d90368dcadfd39c096199e2f1df68df68 | [] | no_license | Adrian0207/-LetsGo_Python | b8fd354ecd5cef37de5263fe76def493cfcdd06a | 06f0a75250b3c7a8d5a06953dce7d8bfb562329b | refs/heads/master | 2023-03-15T11:39:23.140910 | 2021-03-11T23:14:16 | 2021-03-11T23:14:16 | 251,665,293 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 374 | py | Ejercicio15.py | '''
Dadas dos variables numéricas A y B, que el usuario debe teclear,
se pide realizar un algoritmo que intercambie los valores de ambas variables y
muestre cuanto valen al final las dos variables.
'''
A = int(input('Valor de A...'))
B = int(input('Valor de B...'))
C = A; A = B; B = C
print('El valor nuevo de A es... |
8f2dd261ffc2a6699b1d577d9a8bc12e59b4f15c | c087c659655770d55977163ab24286f1407f4f67 | /protocol.py | f9bbda2803a129bb183994e33d8aff17f25381d4 | [] | no_license | IwanVonNeumann/FinAutMin | ef772ea2fc22944c84c432866c44ce970d1c312e | 422a2894b9f2dcd577084e03403c7db1bb7527e0 | refs/heads/master | 2021-08-24T10:49:49.275186 | 2017-12-09T09:40:07 | 2017-12-09T09:40:07 | 109,568,563 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 216 | py | protocol.py | def generate_protocol(trans, output, input_sequence, q_start):
q = q_start
protocol = []
for a in input_sequence:
protocol.append((a, q, output[q][a]))
q = trans[q][a]
return protocol
|
b8021713cd8c9059b325c38cfe63e828265863af | e82b3c6000fe8e4639d6606f9d3605e75a8a5d5c | /src/secondaires/crafting/fonctions/attribut.py | f49bb3373ab18339e474cdb91f3b7a680122c9f2 | [
"BSD-3-Clause"
] | permissive | vincent-lg/tsunami | 804585da7bd1d159ad2c784b39f801963ca73c03 | 7e93bff08cdf891352efba587e89c40f3b4a2301 | refs/heads/master | 2022-08-02T15:54:35.480614 | 2022-07-18T12:06:41 | 2022-07-18T12:06:41 | 25,605,543 | 5 | 2 | BSD-3-Clause | 2019-06-05T15:59:08 | 2014-10-22T21:34:10 | Python | UTF-8 | Python | false | false | 4,683 | py | attribut.py | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... |
0030768fb29b43ddad936e99d359c2a2e9303689 | d38f853399e3660a62ad044602df040a9b935dfd | /cogs/ptags.py | 78a6cfc09453ee21e4a8353737ac64e619ef5268 | [] | no_license | Jashanlol/Coffee-Bot | fd4f0b26ec716f7bfb1ece66a6be39b82ca5e662 | b5f95888f3980aa822127086af60bbd2f791edc8 | refs/heads/master | 2020-03-16T04:32:47.961792 | 2018-05-17T23:58:51 | 2018-05-17T23:58:51 | 132,513,735 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,383 | py | ptags.py | import discord
import os
import datetime
from .utils.dataIO import dataIO
from discord.ext import commands
class ptags:
"""Personal Tags.
Essentially custom personal commands."""
def __init__(self, bot):
self.bot = bot
self.ptags = dataIO.load_json("data/ptags/ptags.json")
def save_s... |
c3d6512d16e81f1f9f6781ef424ca4add65428bb | 94e0d9073981499b0573ad6f2dd54bb7ee205692 | /linesegmentintersections/sweepline_interface.py | c7ccf39362b98ae5bf70d12bdab452cd23ac6513 | [
"MIT"
] | permissive | LiahNikol/line-segment-intersections | 88efba189d335708e6b1d51d13b4275814e85f7d | 0a2eb14b54619568d2b79839319c079b27a53d77 | refs/heads/main | 2023-04-27T07:21:13.042219 | 2021-05-11T20:30:02 | 2021-05-11T20:30:02 | 350,842,260 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,541 | py | sweepline_interface.py | import numpy as np
import copy
from .Segment import intersects
# Find the y value of the line segment at the given x value
# Assumes that the x value is found on the line
def affine_interp(seg, x):
# TODO: What do we do in the case of vertical lines?
# Answer: We return the lowest point in the vertical line
... |
f07a39a0b66111b91b2863a3903b4ffc940f9aac | 3f4d646d79695dd62c66a8519352f69d65297143 | /PyBank/main.py | 12981b8ddfff08a918f98d6fc5bfdcd0177d9edf | [] | no_license | ChiAmyC0987/python_challenge_1 | b417a063258454d015c943ff6f762542dca1bcf7 | 627c8b379d35cebe1ef1e6a1fb36c0dfa8e723cd | refs/heads/master | 2020-06-01T21:07:35.870950 | 2019-06-21T06:49:58 | 2019-06-21T06:49:58 | 190,927,343 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,583 | py | main.py | # Import csv file
import csv
# initialize variables to hold integer, strings, lists
row = 0
Profit_Loss_Now = 0
Profit_Loss_Past = 0
Value = 0
Value2 = 0
Sum_Profit = 0
Diff = 0
Current_Profit = []
Delta_Profit =[]
Profit_Loss = []
Month_Count = -1
Max_P = 0
file_name = "Resources/budget_data.csv"
... |
be3291ea0174b160f6987c0f3e84c1b51f0b671b | 04e19000925732cd9aaf9cadb0efc28d0abdb10d | /setup.py | 58230250363ff6fee2045273ddaad923fa38e5c2 | [] | no_license | SaulArciniegaEsparza/saga_alg_provider | df567985653e3620838b543b32fab4be68064621 | 4d82afad54fca27adf9198078a25ddd64224fc69 | refs/heads/master | 2022-04-18T19:26:17.810204 | 2020-03-19T19:26:30 | 2020-03-19T19:26:30 | 117,503,383 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 787 | py | setup.py | """
SAGA GIS algorithm provider
Installation file
"""
from setuptools import setup, find_packages
setup(
name='pysaga',
version='1.0.0',
author='Saul Arciniega Esparza',
author_email='zaul.ae@gmail.com',
description='A SAGA GIS algorithm provider',
license='BSD',
packages=find_packages(exc... |
e51df7a40b19ef0b56eca70ed0d170ff9cb662be | b40b2bcc63c617afae66a11d15598a588176ff20 | /BOJ/Silver2/타일 채우기.py | 83117392043014e6740cf29f70917d6c8529eb19 | [] | no_license | tjdgus3160/algorithm | c5e66ffa1493dba4faede0491ffab60554647fb5 | 4146170943ec79e22c78e8f3d1ffedd527583c28 | refs/heads/master | 2023-08-22T07:48:53.164453 | 2021-10-21T02:28:02 | 2021-10-21T02:28:02 | 320,226,865 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | 타일 채우기.py | # 2133번
def find(n):
if n%2==1 or n==0:
return 0
if n ==2:
dp[n]=3
return 3
if dp[n] ==0:
dp[n]=find(n-2)*3+2*(sum(dp[:n-3]))
return dp[n]
dp=[0]*31
dp[0] = 1
n=int(input())
print(find(n)) |
1e6743882adbdc45f9354954077a2152ce0eaee4 | 27d963a3ae6f86f4e6a346a6d1e105209d75a4af | /ddqn_ae_esterno/AutoEncoder.py | 87d15e4395638e62273e7fc54ddd94ca40855a05 | [] | no_license | Elena-Umili/RL-Planning | d6041a0e8901ae8020d67fc9991e06d6149df740 | 572d8fdedf8711f4bae6d87e4a5c2ae721c2f705 | refs/heads/master | 2023-02-22T21:33:34.646965 | 2021-01-27T10:11:00 | 2021-01-27T10:11:00 | 293,554,600 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,316 | py | AutoEncoder.py | import random
import numpy as np
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
from PIL import Image
import glob
from torchsummary import summary
from torchvision import datasets, transforms
import warnings
with warn... |
aaf686c8f8eeb89e27a7c5b374a229bf80629e14 | eda0bd9fd332433852af66fdf22c3d863fcf99cb | /photos/migrations/0003_auto_20200616_1321.py | 765cdb0f404b9429f7213ba10d3e1e2feb6e0e11 | [
"MIT"
] | permissive | M4yankChoudhary/ImageBreeze | 824afca5cffa86a81089106d9368e9bf0ad9a21c | 5061a5146bcbff953283cbc5288b69e145b73dd3 | refs/heads/master | 2023-02-27T05:27:34.458562 | 2021-01-30T13:20:54 | 2021-01-30T13:20:54 | 308,091,509 | 4 | 1 | MIT | 2021-01-30T13:21:56 | 2020-10-28T17:26:19 | Python | UTF-8 | Python | false | false | 546 | py | 0003_auto_20200616_1321.py | # Generated by Django 3.0.6 on 2020-06-16 13:21
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('photos', '0002_auto_20200616_1318'),
]
operations = [
migrations.RemoveField(
model_name='usercomment',
name='date',
... |
52ed51d43db89ed8c2396c235774546b2a9ef7e8 | 2a84df5caeda321781df754d3d9172d1e4c3180e | /GRAMMy/Bin/insilico_conversion.py | e85eecc1f16d68c912bc100082b439ccf8f3d97a | [] | no_license | bzrry/bisulfite_cfDNA | 2bc7b4be757be5f230cccbceb9a67f22651dd30f | 55c56c33ff998120e5017012d10cf6f7595f037c | refs/heads/master | 2022-01-11T10:26:40.525303 | 2019-04-15T16:19:45 | 2019-04-15T16:19:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 505 | py | insilico_conversion.py | # Does insilico conversion ...
import sys
import os
import itertools
infile=sys.argv[1]
outfile=sys.argv[2]
conversion=sys.argv[3]
# If ever non-directional libraries are used ...
#if conversion == 'C2T':
# incharacter='C'
# outcharacter='T'
#if conversion == 'G2A':
# incharacter='G'
# outcharacter='A'
incharacter=... |
ff2569c0c9df0115b6dc4a6331c4a815e836285c | 2dc3e384167e2ea5a4a4ccce0be7189acee47c08 | /python files/partSwampedTransform.py | 8d16ae0873358f641bbf3f754b4ba4d78d07f42b | [] | no_license | Ron256/CSC555MiningBigData | 11ae46bb8d800f3e72ea8290498ea26ae829e8f0 | 1dfc454986196d7a2b3d280e4541e7bb4542d359 | refs/heads/main | 2023-08-29T00:53:31.881906 | 2023-08-23T19:34:26 | 2023-08-23T19:34:26 | 406,423,650 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,223 | py | partSwampedTransform.py | # Author: Ronaldlee Ejalu
# CSC 555 Mining Big Data
# HomeWork Assignment 3
import sys
# This is for testing purposes on my local laptop
# fileLocation = 'C:/Users/rejalu1/OneDrive - Henry Ford Health System/CSC555MiningBigData/data/testData.txt'
# def readFile(fileLocation):
# """ Function that generates... |
2eccfd7f337ce22358d38e8bf4d8f6e508514965 | 9e2582390a20f5df6d7d5094425306b1edc77094 | /main.py | 63c867b1311ed2f941a31fc5bd8178ec447685a8 | [
"MIT"
] | permissive | davidadrianrg/startup-success-prediction | bbef9c9ccdb1a2cbc6c47c35471d06f0dd03a99e | 1b49907dd5c8864add55b4cb2d5fe8188937fc56 | refs/heads/master | 2023-04-29T19:16:29.723491 | 2021-05-17T20:44:42 | 2021-05-17T20:44:42 | 350,449,515 | 0 | 0 | MIT | 2021-05-17T10:32:20 | 2021-03-22T18:31:32 | Python | UTF-8 | Python | false | false | 17,336 | py | main.py | """Main file of the program to train a model for startup success prediction."""
# Importing required modules
from os import environ
from warnings import filterwarnings
environ["TF_CPP_MIN_LOG_LEVEL"] = "2" # To disable Tensorflow GPU Warnings
filterwarnings("ignore")
import numpy as np
import pandas as pd
from mode... |
634c19b67883fa861b2bb783840ecd9b99f7c047 | 889512348b0a655f140f0a374972605464d73cb6 | /estoqueTela.py | 8685a5ee9af270038eb3362e0bab3594dfa51e3f | [
"MIT"
] | permissive | god00war/controleEstoque | 1c653f4e6f6996f30b7bb229258abb31e9b743d4 | 204779647fb2b9d530e4c03abd9b081e14900725 | refs/heads/master | 2021-07-10T13:55:40.375821 | 2021-04-09T02:17:56 | 2021-04-09T02:17:56 | 240,384,687 | 0 | 0 | MIT | 2020-02-13T23:01:21 | 2020-02-13T23:01:20 | null | UTF-8 | Python | false | false | 2,142 | py | estoqueTela.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'alterarestoque.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 im... |
c55e19d1eb6a2e3f925942ee890b891e1cc42397 | 34857fbadaf93531e90dbb5dd0619b6c53fb53d6 | /tests/test_data/hover/hover_test1.py | 7b70f6bbb197d996190470116334af96372ac61b | [
"MIT"
] | permissive | pappasam/jedi-language-server | 8c386cddc1c3599d96b4ed8432024820ad4b7087 | 9a377c3aa9fc74cb9979e60cc318c051684ba8ac | refs/heads/main | 2023-08-11T13:34:47.259913 | 2023-07-31T22:05:26 | 2023-07-31T22:05:26 | 203,071,814 | 513 | 67 | MIT | 2023-07-31T23:46:55 | 2019-08-19T00:38:10 | Python | UTF-8 | Python | false | false | 136 | py | hover_test1.py | """Test data for hover."""
import somemodule
somemodule.do_something()
c = somemodule.SomeClass()
c.some_method()
c.some_method2()
|
2935aeee7fa4644909c43ae2ccdccce4100d90f3 | 71390310b5c81383023cbb93ecfdc5e3eaf8f198 | /ex070.py | dcc8d3f37191246b70d45f92394e13e01f92f55e | [] | no_license | osnipezzini/PythonExercicios | e4a87f6d4163aba654c515405a77c2ac4b284d50 | eeff446f278c28afe91c196cf9285b7a3e975112 | refs/heads/master | 2021-09-08T15:30:26.236931 | 2018-03-10T18:38:39 | 2018-03-10T18:38:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 914 | py | ex070.py | '''
Crie um programa que leia o nome e o preço de vários produtos. o programa deverá perguntar se o usuário vai continuar. No final, mostre:
* Qual é o total gasto na compra
* Quantos produtos custam mais de R$1000
* Qual é o nome do produto mais barato.
'''
caro = barato = precobarato = soma = cont = 0
while True:
... |
dec0df5e3b4030c1e63c6420d70ea2b1da2e0135 | 44859c1449a23c814e2716ad86f4bc64c1ff7268 | /main.py | 46f1598d1ba600da079b179864ef6e337c974e2e | [] | no_license | SokGit/Lists_V1 | c0104cdb70fbe098325c4926db11793dd3dbe016 | 6f1d28b183aec3e025effba942cbb88e065bab2b | refs/heads/master | 2023-02-26T03:16:56.068497 | 2021-01-31T17:59:50 | 2021-01-31T17:59:50 | 334,494,483 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,042 | py | main.py | import matplotlib as plt
print(plt)
import pandas as pd
print(pd)
pd.DataFrame()
# Create dict holding the data
data = {'Sym': ['APPL', 'APPL', 'APPL'], 'Price': [105.00, 117.05, 289.90],
'Data': ['2015/12/31', '2017/12/01', '2019/12/27']}
# Create Dataframe from the data
positions = pd.DataFrame(data=data)
p... |
f49a446caa62e23671dcdc762eb52d2798a425be | 0d3f78e5a3fe3f8173965e0e44e9c3b8969e84f2 | /test.py | 264a2d3ac2d49ea14986a07eafe2b397863aa583 | [] | no_license | zxltmj/text_simhash | f1bc6aeee87770358107b3f21b77489a7a02a0db | ad39b236b61ffb82a248a2f24324f611dbc93a2e | refs/heads/master | 2021-06-28T22:21:29.439741 | 2017-09-22T07:11:27 | 2017-09-22T07:11:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 772 | py | test.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from similarity import *
sy = similarity('similarity.cfg')
def test():
#种子做成 simhash库
str = "我是南翔技工拖拉机学院手扶拖拉机专业的。不用多久,我就会升职加薪,当上总经理,出任CEO,走上人生巅峰。,清华大"
m = sy.extract_keywords(str)
for (k,v) in m:
print k,v
hash_model,doc_dict = sy.sim... |
236c04e47e7fb6962b00374ded393834866d0efb | d5a99877de00a1505488e4bf5557131933ec3b96 | /day13/s2.py | 3e7ee54b863472110fd174d02fa58935377d3199 | [] | no_license | iosdouble/pythonlearn | 7fa7bdfa4f171b24bac572eb66b9e6062d0e1da5 | 640c7f2d52562440fdeb7d83b0cc5803a749bdac | refs/heads/master | 2020-08-29T22:48:32.288418 | 2020-07-14T07:52:36 | 2020-07-14T07:52:36 | 218,193,681 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 538 | py | s2.py |
# s = {1,2,3,4,3,3,3,3,3,5}
# ## 定义一个字典
# dic = {"name":"nihui","age":123}
#
# v = type(s)
# print(v)
# print(s)
#
# set_test = set("hello")
# set_test1 = set(["lell","test","set"])
# print(set_test)
# print(set_test1)
#
# f_set_test = frozenset(set_test)
# print(f_set_test)
# set
s = {1,2,3,4,3,5}
print(s)
v = s.d... |
397954b5031dcb65b318352014796c07baaf49b4 | 2a5441279acb8666868eca4952782950e83e7a5e | /dataset_reader.py | 2b2c0af4944c2a2047ccfc5738e575a14ba6a72b | [
"Unlicense"
] | permissive | saist1993/tensor-related-activities | 2ee9ba3bfa2cda63dcf3223f903395e1315b594d | 07612641f1da92bdf07434bdcbd9e9ecde046b5c | refs/heads/master | 2021-01-25T05:09:26.048255 | 2017-07-07T14:12:42 | 2017-07-07T14:12:42 | 93,511,515 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,981 | py | dataset_reader.py | import csv
import pandas as pd
from sklearn import preprocessing
import numpy as np
fname = "datasets/wordnet/raw/valid.cfacts" #dataset file name. Since wordnet is tabseperated file.
facts = [] #place where the data after file parsing would be stored
#file is in tab seperated formated
with open(fname) as tsv:
read... |
2c9f92e8f378006b8c3649357f80720f26470e6e | ac0b73b22b27abcf6e6c958ea62ddf4690954c2f | /script/cdh5_install_cluster.py | da38ccb9044a57c1a312f87337d433ae7bb1bc34 | [] | no_license | Ethonwu/Cloudera-CDH-all-in-one-Docker | 4f8d87bc5360da561c7aa1ffc79f1b31daf3a420 | 7be852526bc1bf10eb152361391b59258e9e24a2 | refs/heads/master | 2020-12-12T04:19:47.945138 | 2020-09-04T02:37:41 | 2020-09-04T02:37:41 | 234,040,582 | 6 | 1 | null | null | null | null | UTF-8 | Python | false | false | 31,914 | py | cdh5_install_cluster.py | from cm_api.api_client import ApiResource
from cm_api.endpoints.clusters import ApiCluster
from cm_api.endpoints.clusters import create_cluster
from cm_api.endpoints.parcels import ApiParcel
from cm_api.endpoints.parcels import get_parcel
from cm_api.endpoints.cms import ClouderaManager
from cm_api.endpoints.services i... |
b0efc77f8669a2639373dc1a4834ceadc1c24d06 | f05cf1e654327fc1fe3afe3e3c20c672a0444a35 | /day10/day10.py | b529156eeaf27e13d78a421a1f3573decd1fa170 | [] | no_license | aj3x/adventofcode2020 | 575eb49bfbefc5677bf827032f08f12066c12cf5 | d5762975584c04c369cd464b0519fe4ea0712307 | refs/heads/master | 2023-02-08T06:37:50.428073 | 2020-12-27T18:00:56 | 2020-12-27T18:00:56 | 322,155,452 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,446 | py | day10.py | import userin
# sort arr of ints
# run through list components
# check difference between this and last item
# add one to list of items with 3 volts
# multiply list of 3 with list of 1
def sumDifferences(arr):
counts = [1,0]
prev = 0
for i in range(0, len(arr)):
counts[(prev - arr[i] - 1) // 2] +=1
pre... |
d8ab8ffcced17c15d68fe20cd158505d82e881d5 | 275347ff11f62c5fb2e9f2950d07bf6bd27dc89d | /203_Python_LABS/Lab1/m1subnet.py | c0ab6ec3c96dfee9528b1b070a83b7318c5aed3a | [] | no_license | lgwakano/ISS | cf03bfe193d73ffa6ed1be7f421d37e15c008401 | f2121982a28369c65a4c22aefae50522ae653295 | refs/heads/master | 2022-04-06T05:50:56.889996 | 2020-03-04T19:40:06 | 2020-03-04T19:40:06 | 206,858,292 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,428 | py | m1subnet.py | # @filename: [m1subnet]
# @author [Luiz Wakano]
# @course ITSC203
# @create date 2020-01-20 12:30:29
# @details [description]
# @resources: https://www.aelius.com/njh/subnet_sheet.html --subnet
# https://www.w3schools.com/python/ref_func_range.asp --range
# https://docs.python.org/3/tutorial/controlflow.html#unpacking-... |
de776f49cca9f7ee34f3a52756ad00fc43445d33 | 87e2f7d7da5fbbfa1ad2d265338163cbc67479bf | /stigmapyze/scraping/praw_reddit.py | 2f23fb8570e68e2a47fbb5d895506405bad908d5 | [] | no_license | michael-suggs/stigma-conceptualization | ec10e4db8cdb9d294b3e67d7da8aa2819035c9bd | 86d60b4dcdb9c4c662464c97dc2729379270bad1 | refs/heads/main | 2023-06-10T18:57:23.204697 | 2021-07-02T15:32:55 | 2021-07-02T15:32:55 | 334,200,673 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,541 | py | praw_reddit.py | import datetime as dt
import json
from dataclasses import dataclass
from functools import singledispatch
from typing import List, Generator
import praw
from ..common.reddit_post import RedditPost
@dataclass(init=False)
class Config:
"""Config class for PRAW instance.
Attributes:
client_id:
... |
b53d3ddd41bfee02fc7a9d22ebe7314e81414ed4 | ea17e96a122d908c37e1b988b6096bf4c16c37f7 | /workshop_0/solutions/solution_exercise1.py | cc6640525f4550c48c2012fd532e2df8a343e751 | [] | no_license | mibrah42/programming_workshops | 8ef93bf169ba3bc2d53af9d76c2c21da9aabd21a | 6b102f7eff1addff1c042da2ed3461b35eda9929 | refs/heads/master | 2020-04-18T13:30:30.695847 | 2019-04-05T22:02:21 | 2019-04-05T22:02:21 | 167,563,395 | 1 | 2 | null | 2019-03-01T22:41:09 | 2019-01-25T14:51:42 | Python | UTF-8 | Python | false | false | 976 | py | solution_exercise1.py | from math import pi
# Exercise 1
# Complete the functions below
# use the command: py -m pytest -l
# to test your code in the terminal
# 1. write a function add that takes the parameters x and y
# and returns the sum
def add(x,y):
return x + y
# 2. write a function called square that takes the parameter x
# an... |
0551311babcb1ade7f06f1e0237a23737649a21e | 1a989487f6de11df5e4bd4c526d63df57cfec5b1 | /architectures.py | 713d7a675c77a0e630b0d8989c9fd4f0d0f3ab6f | [
"MIT"
] | permissive | mfederici/ReproducibleDL_AMLAB | 6a18e5364bd6471b1cb47dbf7f528e28a063e1fd | 437d9484b8d98b26463365e5bd20c05163f183b7 | refs/heads/master | 2023-09-06T06:25:18.556708 | 2021-11-09T12:41:09 | 2021-11-09T12:41:09 | 425,793,198 | 1 | 0 | MIT | 2021-11-09T12:41:10 | 2021-11-08T10:29:28 | Python | UTF-8 | Python | false | false | 1,716 | py | architectures.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Independent, Normal, Distribution
from utils import Apply
class Encoder(nn.Module):
def __init__(self, z_dim: int):
super(Encoder, self).__init__()
self.net = nn.Sequential(
Apply(torch... |
33751bd9cbe335580ae75969a6ef3f55eebac9f0 | a4fbb1107384c2ebe0cd3fdc3993180c068d48da | /todos/serializers.py | 3934d4ffa4dadb58be578d2fe8ba0d0db79e09a2 | [] | no_license | tusharpal-acro/todoapp | 589e2cd6f834023dd2c37a45a8c17c9fd9ef7797 | 4627966884325e0c2e295cf6e01e86e3f7919ffd | refs/heads/master | 2023-05-29T07:25:44.070847 | 2021-05-27T05:07:26 | 2021-05-27T05:07:26 | 371,251,323 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 507 | py | serializers.py | from rest_framework import serializers
from .models import Category, Todo
class CategorySerializer(serializers.ModelSerializer):
class Meta:
model = Category
fields = "__all__"
def get_fields(self):
fields = super(CategorySerializer, self).get_fields()
fields['subca... |
098f541663b38b50686175b932e77f86191dee6f | 8f54c149d59f3768f4e91d5daaf0d697d6be914d | /0529/sato_parameter_1d.py | 4afd998d1cdb17f2a9526c018fb31c69089eb396 | [] | no_license | OptMist-Tokyo/experiment2020 | dd7af586bb5e45cbce7ea3c503de9938eaceb76a | b638a0c0763e996820e1cb1deb29a6acc5f3297c | refs/heads/master | 2022-11-13T18:09:21.931703 | 2020-07-10T06:50:56 | 2020-07-10T06:50:56 | 260,602,958 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,785 | py | sato_parameter_1d.py | #cosing: utf-8
#Dummy Japanese character: あ
#Gurobi Optimizerのパッケージをインポート
import gurobipy as gp
import pandas as pd
# 学生番号の集合を定義:学生N人
N = 30 #てきとう
I = [i for i in range(N)]
# 席位置の集合を定義:縦K行、横L列
K = 7 #てきとう
L = 10
J = [j for j in range(K*L)]
# 前方左側を0,そこから右に1,2,...と番号を振る.
# j\in Jは前からj//L番目,左からj%p番目の席を表す.
#効用関数とそれぞれの... |
f679e3752797fc810af372a9877b3bee78c8dec5 | 5850d0bd221cec491f94cf68a6d880abdb838f0e | /pynfb/settings_widget/signals.py | c294b4de44452bea0602fb404facd59b5d5e5de3 | [] | no_license | nickware44/DeepBCI | 336a437e2a519d09e74f57e692e4c59ac7b1db70 | 96b99b36e888a740dd955b7f6d3f8f05b94efd17 | refs/heads/master | 2023-08-03T09:08:20.283055 | 2023-07-27T19:17:13 | 2023-07-27T19:17:13 | 336,832,704 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,591 | py | signals.py | from PyQt5 import QtCore, QtGui, QtWidgets
from pynfb.serializers.defaults import vectors_defaults as defaults
from pynfb.settings_widget import FileSelectorLine
default_signal = defaults['vSignals']['DerivedSignal'][0]
roi_labels = ['CUSTOM', 'bankssts-lh', 'bankssts-rh', 'caudalanteriorcingulate-lh', 'caudalanterio... |
d20ef41ad5537824595971b6ad622d9ebdff124e | 840b38f3e2bcaf68b8b13add5abb0049b817460b | /dashboard/dash_app/test/widget_model_tests.py | b3177109a49a9ae818e9bf277aaaaa0f0fe2c878 | [] | no_license | simona-kurnavova/dashboard-app-backend | b6d2ec9d7a63ce28a344c6496c23bb92200c6e88 | 6a48f63bf866c06ad9069534bad41a7684090609 | refs/heads/master | 2021-07-15T06:45:22.312605 | 2018-08-23T10:55:25 | 2018-08-23T10:55:25 | 120,210,694 | 4 | 0 | null | 2021-06-10T20:45:06 | 2018-02-04T18:21:05 | Python | UTF-8 | Python | false | false | 2,970 | py | widget_model_tests.py | from django.contrib.auth.models import User
from django.test import TestCase
from dash_app.models import Widget, Dashboard, App, Account
class WidgetModelTestCase(TestCase):
def setUp(self):
user0 = User.objects.create(username='user0', password='password', email='hello@world.com')
user1 =... |
c0b22ca0a56bedbffc4a4b945639ba877774f79c | 291f0aa9a40eeca26fb08106c952b9347db7dba7 | /nz_crawl_demo/day4/doutula.py | 92cac9ddd3a98c63d6fc736bf53c21c86e069c54 | [
"Apache-2.0"
] | permissive | gaohj/nzflask_bbs | fad10b93f8f495a94d5d6db6f5c60d85c1c85518 | 36a94c380b78241ed5d1e07edab9618c3e8d477b | refs/heads/master | 2022-12-12T21:43:17.417294 | 2020-03-20T10:28:22 | 2020-03-20T10:28:22 | 239,702,874 | 0 | 2 | Apache-2.0 | 2022-12-08T03:50:07 | 2020-02-11T07:34:01 | JavaScript | UTF-8 | Python | false | false | 2,742 | py | doutula.py | import os
import requests #请求库
from urllib import request # 下载图片用
from lxml import etree #网络解析库
from queue import Queue #队列
import threading
import re
#生产者 页面队列取出 然后下载页面中的 图片url 放入图片队列
class Producer(threading.Thread):
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537... |
3d582d78910593dabb29416be6914a6315c2bda8 | ea74a2c426daeaf54fab9c3a92a87d6628b0bc03 | /flight_log_analyzer/bin2log.py | ffff5cbc3b16cdc87bd1fe0485feb00b2eceff01 | [] | no_license | jadbarrere/e4e-tools | c107e48799047071becc45ecd6f695c6fed2274b | 0005f4cc4507bc20fb1672a579e9d9753c88ed31 | refs/heads/master | 2020-06-01T14:02:59.039766 | 2019-05-07T17:57:38 | 2019-05-07T17:57:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 644 | py | bin2log.py | #!/usr/bin/env python
from pymavlink import mavutil
def bin2log(bin_filename, log_filename):
mavmaster = mavutil.mavlink_connection(bin_filename)
logfile = open(log_filename, 'w')
while True:
msg = mavmaster.recv_match()
if msg is None:
break
logfile.write('%s, '% msg.get_type())
for field in xrange(len... |
46728eb72fa128389d099703c5ca220961942fcc | 2180b07395153daaa52b1a8c15d66c303fb59c86 | /python_espressioni_regolari1.py | f66d34791a423275569895ef00882d09eb017129 | [] | no_license | giuschil/Python-Essentials | c5f320cea07fb5c8e8cf48c51d0f4cf34209e4fc | 583c8094fac00cf7018edd1a0e2a702c9aecaea7 | refs/heads/main | 2023-07-13T21:51:25.585508 | 2021-08-31T18:32:29 | 2021-08-31T18:32:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,058 | py | python_espressioni_regolari1.py | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 12 12:47:38 2018
@author: giuschil
"""
import re
#trova inizio e fine delle parole divise tra le virgole in un testo divis
#METODO FINDINTER
regex = r"([a-zA-Z]+) \d+"
matches = re.finditer(regex,"June 24,August 9,Dec 12")
for match in matches:
print ... |
e3f5cb2b3745ebad0789d5a48a984499ccfaa236 | afc44413bfdc959cd81f7d738981563900e42db6 | /fast_net.py | f445a55976c8fb64de684df2c8f1817c6bbbb96d | [] | no_license | howonlee/twostrangethings | 44b8421ef1a7bc7ef48e46517d474ffb64d8c19f | 924269a120c34ccb0f6deb3a9af4995126f1d722 | refs/heads/master | 2020-04-18T23:54:50.987069 | 2019-02-18T16:04:00 | 2019-02-18T16:04:00 | 167,833,580 | 17 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,271 | py | fast_net.py | import random
import datetime
import pickle
import numpy as np
import numpy.random as npr
import numpy.linalg as npl
def act(net):
return np.where(net > 0, net, net * 0.5)
def dact(net):
return np.where(net > 0, 1., 0.5)
def inv_act(h):
return np.where(h > 0, h, h * 2)
def errfn(h2, ys):
return 0.5 ... |
d63f68a937085f63b63a798bd6fc99d80a6c0645 | 942876e55194df37989b854bfdfda05013dc650c | /runfile_space.py | fc9506226ef006ada1fa17ecdcc54e4aed73a10a | [] | no_license | ManuSchmi88/lpj_ll_coupling_tools | 796784a358936ccdb0a7272a82be6bb374ddf7ab | 2fb5e240c66b79a2fedcaa81acd104e7c7754ebb | refs/heads/master | 2020-03-28T17:19:58.199771 | 2019-04-01T13:42:48 | 2019-04-01T13:42:48 | 148,779,188 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,422 | py | runfile_space.py | """
Main driver file for coupled model-run between LANDLAB and LPJGUESS.
Derived from the messy thing I produced to glue/patch the model together.
"""
## Import necessary Python and Landlab Modules
#basic grid setup
from landlab import RasterModelGrid
from landlab import CLOSED_BOUNDARY, FIXED_VALUE_BOUNDARY
#landlab ... |
27bb519b4b7578b86319e1124c042badbeeb7b90 | 62a9636ad372a43a846b0141832547be6f971787 | /merge_sort/brute_force.py | f9fac684fca588ed3b54f526cdf91d9e21462ad0 | [] | no_license | MillerJL/CS325_Algorithms | e1ac02713843a0e6f2d81075b326cdec9afc1e22 | 50e46697c5312ac73897b4ed60da48fd84b8429c | refs/heads/master | 2021-01-10T22:44:18.572418 | 2016-11-10T06:16:53 | 2016-11-10T06:16:53 | 70,362,385 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 783 | py | brute_force.py | import sys
import csv
# getFileContents
#
# Retreives file contents of given input file and formats it as an array
#
# @filePath Path to file containing algorithm input
# @return Contents of input file as array
def getFileContents(filePath):
with open(filePath, 'rb') as f:
reader = csv.reader(f)
fi... |
a2cefa03faace36e3b24bed0627797d315cfc8ea | a8cfa81fab94b6f2c6f2a41c17afa5548322f746 | /models/funcatt_model.py | f166cd0658da567df3046ec6f6e6c7d393033eb4 | [] | no_license | hxiaom/SFGAN | 763aca6bcb6a83ef2845a5530943c72b5a5660bd | a25f5b279166c7f0871a0c2b0b2d27c83b818c7d | refs/heads/master | 2023-07-25T13:36:31.896746 | 2021-03-10T08:30:11 | 2021-03-10T08:30:11 | 286,151,442 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,781 | py | funcatt_model.py | from base.base_model import BaseModel
import tensorflow as tf
import tensorflow_addons as tfa
from keras.engine.topology import Layer
from keras.models import Sequential
from keras.layers import Input, Dense, Conv2D, MaxPooling2D, Dropout, Flatten, Embedding, Lambda, Multiply, Concatenate, Masking
from keras.layers im... |
54d68cd2cb0c163e9dd71002c731a0b81b3978d3 | cb9bd4b6a5a395cd3437bb2ed068efafa8d61cd4 | /tests/trac/test-trac-0076.py | 61f9c58909bfb7636d42f3de2e1639e57f40ac26 | [
"Apache-2.0"
] | permissive | msherry/PyXB-1.1.4 | bf4b137e51642f62afa898464c431c28386cbe99 | 08fba3ed97c3ecdfea260da0253d6e6718a2ce62 | refs/heads/master | 2021-03-12T20:26:08.120442 | 2013-09-18T01:33:06 | 2013-09-18T01:33:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,084 | py | test-trac-0076.py | import pyxb_114.binding.generate
import pyxb_114.binding.datatypes as xs
import pyxb_114.binding.basis
import pyxb_114.utils.domutils
import os.path
xsd='''<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
... |
8bd0f912eb132402855104dee531fc6ece1e1582 | 5fb53d866d2db9bdf259326b549611709cdb1dca | /scripts/celestron.py | c9d05acb995daa57e8238d94b3f0e92e0437ce0e | [] | no_license | ajmendez/graffito | 3a2adacd95682b37abfd0d49e38eac4b3d2a00d7 | 72d37df2bb333724115ee0b93b5aec4652f1d9b3 | refs/heads/master | 2016-09-06T03:42:36.550991 | 2014-07-04T07:08:47 | 2014-07-04T07:08:47 | 19,099,674 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 13,583 | py | celestron.py | #!/usr/bin/python
# https://github.com/atomicpunk/scripts/edit/master/celestron.py
# Copyright 2012 Todd Brandt <tebrandt@frontier.com>
#
# This program is free software; you may redistribute it and/or modify it
# under the same terms as Perl itself.
#utility to organize media collections
#Copyright (C) 2012 Todd Bra... |
6cc54bd372aa0308ec1bab39bd9956ec6ddffcb4 | 79c2eb1c014e0067f18ae40a4b1cfc625bbf43ab | /plot-examples.py | 39218cce393d91234ecb8fb18e051beb3c47c2ef | [] | no_license | jdavid54/plt_curves | 9bc25ede0ff58583d5365f7a821f566ad865a6ad | 5ccee241afd6a2a5e0640a430374c89b80031a41 | refs/heads/main | 2023-03-29T04:04:01.241057 | 2021-03-25T14:41:14 | 2021-03-25T14:41:14 | 351,437,547 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,128 | py | plot-examples.py | #-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: Jean
#
# Created: 09/09/2018
# Copyright: (c) Jean 2018
# Licence: <your licence>
#-------------------------------------------------------------------------------
import numpy as... |
6fc30a2f6bfbffeb5f43076e937cfb305d0fa810 | 999026e07e26080ac2843e1baa6da66b5b8a591f | /helloworld.py | a7bdc4af21a4b6fe1e85ad6a8120d63c683b26e8 | [] | no_license | KALALRANJITHKUMAR/MLOPS | f4797ef40c7640f1b2b42c8fd45fcd5b696f6b72 | d1360c6010321a2e412a2368da31f56b5680ccb8 | refs/heads/main | 2023-06-06T03:55:12.863019 | 2021-06-25T16:47:24 | 2021-06-25T16:47:24 | 379,498,256 | 0 | 0 | null | 2021-06-25T16:47:25 | 2021-06-23T06:12:07 | Python | UTF-8 | Python | false | false | 131 | py | helloworld.py | name = str(input())
print(f"hello {name}, welcome to mlops with dvc".upper())
print("i am going to add new changes to new branch")
|
49ab39340515b0f2f58aa25b51e486572081872c | b56b31a2e4d9bcb8d98dd862385507cc60a0817e | /ModelGenerator-pytorch/datasets/DatasetSplitter.py | 0ff4cb84c63664526d2fca093fc953509237cdbb | [
"MIT"
] | permissive | starxcheng/MusicScoreClassifier | fcfd03658988bdabb2383109ea7c11f258e4b018 | 203edfed510a753ac952eb326679a5b2bc03935e | refs/heads/master | 2020-12-29T12:02:31.427013 | 2019-02-05T10:26:39 | 2019-02-05T10:26:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,270 | py | DatasetSplitter.py | import os
import random
import shutil
from typing import List
import numpy
class DatasetSplitter:
""" The abstract base class for the datasets used to train the model """
def __init__(self,
source_directory: str,
destination_directory: str):
"""
:param sour... |
4b5ee86686ca12508880f201de78c0a5c3ccdfcf | 83110a1cdc8e14e858ccc71dea0ba307a26426d0 | /Layers/mask_capsule.py | d7f3ce6e310ee2b1e3730a4543f39dbd5c549231 | [] | no_license | namish800/CapsuleNet | d08128d44e8ac940c34d0244a76ecb83a265ddbb | d408a02bc99fdd92f6c2b40baccb82b0439207ec | refs/heads/master | 2020-04-09T01:57:12.625182 | 2018-12-01T10:39:01 | 2018-12-01T10:39:01 | 159,923,644 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 966 | py | mask_capsule.py | from keras.layers.core import Layer
from keras import backend as K
class MaskCapsule(Layer):
def __init__(self, **kwargs):
super(MaskCapsule, self).__init__(**kwargs)
def build(self, input_shape):
super(MaskCapsule, self).build(input_shape)
def call(self, inputs):
if type(inputs)... |
bba25f77b60f71a0cf43deb7bbafd4dd2b8dd521 | 5d38e8877636662c6f891a7b7be26e67d0b66211 | /Smart-Home/TempAndHum.py | 4c87540577b291794b48b0c5cd10e2081202e0ff | [] | no_license | efishliu/Smart-Home-System | 84cb50abd9dfead0373d1c92160ef5890aa8dd01 | 7c27d0a5952ef1949b2a62f0ea26952ce4942f44 | refs/heads/master | 2021-06-03T11:26:48.448186 | 2020-04-09T13:40:07 | 2020-04-09T13:40:07 | 254,368,159 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,353 | py | TempAndHum.py | #coding=utf8
'''***********************************************
*模块: 温湿度模块
*主要功能: 1.采集温度和湿度
2.将采集到的温度湿度保存到数据库中
***********************************************'''
import mysqlcon as mc
import time
import Motor as mt
'''***********************************************
*函数: temp_hum_store
*主要功能: 将温湿度数据进行转换,并存入数... |
c369157bfc385150c69318ae76d1820d1aab6388 | 3921ed06979f0822f3bfb1c646ce95556b3c47fc | /rsa/rsa.py | 2658d63fcde370361076932a74f7ace26553405d | [] | no_license | rajshiv169/pwn | 5ed98f837135e7b66a4f0a58fc4c9a8e8d6dd4d3 | 0028f1a3f11bf4d46f0bc6c12101f220a3ab73ef | refs/heads/master | 2020-04-03T03:07:31.832177 | 2018-10-27T20:24:32 | 2018-10-27T20:24:32 | 154,977,080 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,934 | py | rsa.py | #!/usr/bin/python3
from math import gcd as bltin_gcd
from binascii import hexlify
import random
flag="RCTF{}".format("{1_sh0uld_hav3_gone_with_Sha1_for_3ncryt1i0n}")
e=0x10001
prime=[70001, 70003, 70009, 70019, 70039, 70051, 70061, 70067, 70079, 70099, 70111, 70117, 70121, 70123, 70139, 70141, 70157, 70163, 70177, 7... |
06574867cffd5383b775889222f39cc3266f4797 | 3a3327abf1d43d58a3d761d2c6ec6f0f80983c2e | /France IOI/01 - Fundamentals 1/15 - Vendanges.py | 00d47dea7b14d817c88b4ccad5ab708cd523cc17 | [] | no_license | arnaudpilato/Wild-Code-School | deee0686244f665dafa0c0d34504ea1754d896e8 | 58342fc5884d9b75f95dab794c75ee08822822e2 | refs/heads/master | 2023-08-29T02:22:10.419503 | 2021-11-08T10:07:33 | 2021-11-08T10:07:33 | 299,727,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 157 | py | 15 - Vendanges.py | from robot import *
for loop in range (20):
ramasser()
for loop in range (15):
droite()
deposer()
for loop in range (15):
gauche()
|
06bdcfcdef6e77d451bdb043036c8f4a8aec8fb6 | 2128129588b4c85c29534da6ae54b3d9b01f0f9a | /com/minijj/flask/diff.py | ef5c993fe00bcd9cc5b41fe580f4247c38d5edd8 | [] | no_license | lkaiser/myhope | 2861b3a8b5790ee5eddafc3c28e65be5cff6d32a | cece533aa2c09c47fc118a6c7f1cbeb59c0ced04 | refs/heads/master | 2020-03-28T20:16:23.508929 | 2017-10-13T02:17:11 | 2017-10-13T02:17:11 | 94,610,140 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,166 | py | diff.py | # coding=utf-8
import datetime
import json
import threading
import time
from threading import Timer
import websocket
import dataStore
import core.constants as constants
from core.db import rediscon
class CycleList(object):
def __init__(self, maxsize):
self.list = []
self.maxsize = maxsize
... |
36c6931b137848bb146f7e0aefcbc16f973102af | dcfc88503e3a8df5d9083b512178d254727d1a31 | /axelrod/strategies/inverse.py | 036849288f7f9d4dab886fd22dfd9010b479ea92 | [
"MIT"
] | permissive | Axelrod-Python/Axelrod | b8502822da103fbf1a56ffbc090453b95bf9f2d8 | fa748627cd4f0333bb2dbfcb1454372a78a9098a | refs/heads/dev | 2023-09-04T06:41:55.216809 | 2023-07-10T19:42:54 | 2023-07-14T02:37:16 | 30,959,449 | 673 | 289 | NOASSERTION | 2023-07-14T02:37:18 | 2015-02-18T09:37:17 | Python | UTF-8 | Python | false | false | 1,166 | py | inverse.py | from axelrod.action import Action
from axelrod.player import Player
C, D = Action.C, Action.D
class Inverse(Player):
"""A player who defects with a probability that diminishes relative to how
long ago the opponent defected.
Names:
- Inverse: Original Name by Karol Langner
"""
name = "Inver... |
ba80d2f15e6e037eb54780e1af90aaffce727b85 | 595b10aa5b86304a11165fa02e41aaca9fc0bfc4 | /test/test_shm.py | 342988533b6230c6404c88443f479a55e1a32777 | [
"MIT"
] | permissive | arquolo/glow | c98b3f3c17993cb97c95194af5da36d08a20287b | 1ecf40cf265ab50ec0f660b8afbd7b48ca4c3ebf | refs/heads/master | 2023-08-31T12:58:12.566727 | 2023-08-21T18:02:29 | 2023-08-23T09:46:44 | 181,520,433 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,046 | py | test_shm.py | import time
import weakref
from multiprocessing.shared_memory import SharedMemory
import numpy as np
from loky import get_reusable_executor
# import sys
# from loky.backend import resource_tracker
# sys.modules['multiprocessing.resource_tracker'] = resource_tracker
class SharedArray:
def __init__(self, arr):
... |
e4f08881a6670e47f8579f5ebe9f7af9b4adc2df | 68bb91369315ebda27ba8365052807ad13b31ec5 | /KiloDisplay/GameObject.py | e2c2b188a3b437b953e1d3f135c6e1fe4c7602fe | [] | no_license | adammhaile/BiblioPixelTestingGround | 16a046a42104398ad6d6c12135777f1d81e99121 | 102929747a1b91467b5813821b53a967a89f94f1 | refs/heads/master | 2021-01-17T11:01:31.379500 | 2018-07-19T13:51:12 | 2018-07-19T13:51:12 | 39,333,509 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 100 | py | GameObject.py | class GameObject():
def __init__(led):
self.led = led
self.pos = (0,0)
|
5b298752a30f3ca23d0a9b9ea0b8bf407fffe7bf | 23768446c3dbe00ec383217a08e088bd45f4b589 | /test.py | ed1074f311ad3a3cc829e213e0c431fc717853e9 | [] | no_license | nikita199801/Python_calc | 398f0d438bfda347b4ccb7de10e0b336f6f9647e | c386fdc409d6190c7a3486efc7932f02248bcb4c | refs/heads/master | 2020-04-29T17:44:14.667734 | 2019-03-18T14:38:10 | 2019-03-18T14:38:10 | 176,304,853 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 414 | py | test.py | import sys
def vvod(stroka):
global sum
if stroka == 'exit':
sys.exit()
for i in stroka:
if i == '+':
num=stroka.split("+")
sum=int(num[0])+int(num[1])
elif i == '-':
num =stroka.split('-')
sum=int(num[0])-int(num[1])
elif i =='*':
num =stroka.split('*')
sum=int(num[0])*int(num[1])
elif i... |
d00f33b7f624a061fd07e37cb0647f09b1493076 | 16be9e09437531907a178adda8f9d6627e5185d3 | /tests/test_mockrdd.py | 7451fc7d57fec14a8cb4c47da5402088716aedad | [
"MIT"
] | permissive | LiveRamp/mockrdd | 0b70d4fb2d7ecbfcdad781ce1bb98905b2d5bb0f | e72892fb01cc98e6e58b31773f2f3208c5896afc | refs/heads/master | 2023-06-24T19:08:03.442520 | 2023-06-19T08:50:54 | 2023-06-19T08:50:54 | 152,152,263 | 6 | 4 | null | null | null | null | UTF-8 | Python | false | false | 12,781 | py | test_mockrdd.py | # Copyright 2018 LiveRamp
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the “Software”), to deal in
# the Software without restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, su... |
b14473e71f42fcaebb5a2264ccb9190dba5bb8da | 07c5bb9f8d275a8628e88a472380772595d03e4a | /debug_IDs.py | 9618e55ed103dbafd3b22c714f5370f4e4df3749 | [] | no_license | cshimmin/pubsub-debugstream | 4b49becf28f80c5526396aabf0f3655f16df053a | 607c545df046d37e25728246ae1165ed01325046 | refs/heads/master | 2021-01-10T13:16:08.351999 | 2016-03-25T20:06:55 | 2016-03-25T20:06:55 | 54,744,560 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 679 | py | debug_IDs.py | #!/usr/bin/env python
import redis
if __name__ == "__main__":
from argparse import ArgumentParser
parser = ArgumentParser(description="Add/remove IDs from the debug stream")
parser.add_argument("--add", metavar="ID", nargs="+", default=[], help="add ID(s) to the debug stream.")
parser.add_argument("--... |
a04ba56a7bdd9070d5cb9d3d04eb3ef8cb949970 | 173ba416767998c75b7248d9a25dae4f69dbe8b0 | /sampler/overlay_drawingarea.py | a60039b6aa341af8b9d2e8859151510c94ab2c6d | [] | no_license | brain-deaf/note | 0c172f1ade5931aff72c523d20003efa12ee519c | a1e9ce2ccd81748eb1191aea1dbf79c945d95abf | refs/heads/master | 2021-01-06T20:41:52.817723 | 2014-05-14T05:29:00 | 2014-05-14T05:29:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,414 | py | overlay_drawingarea.py | from gi.repository import Gtk
import select_box
#this was a test, currently not being used for the mapping editor
class MyWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="Hello World")
self.box = Gtk.Box(spacing=6)
self.add(self.box)
self.button1 = Gtk.Button(label="Hello")
self.b... |
ed8c854faa13159e1fa9d898dbe5fb84f8b79112 | c0e8b04ab7b8e3af59393b4d8938c5cc0a516ecd | /lib/filewatcher/filewatchconfig.py | edc95e42eea0407cdb0977716b363f03dc484545 | [
"MIT"
] | permissive | yinyin/FileWatcher | cd3aeb7a910e29073850cb3e46fbfac62b41cf2d | c415b201eaaeb2ab84d0a6ee4f6a290aeaa4eacf | refs/heads/master | 2021-01-21T01:57:34.739110 | 2016-07-24T10:38:25 | 2016-07-24T10:38:25 | 3,661,823 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 17,824 | py | filewatchconfig.py |
# -*- coding: utf-8 -*-
""" 設定檔相關物件與共用函式定義 """
import os
import re
import time
import datetime
import yaml
from filewatcher import metadatum
class WatcherConfiguration(object):
""" global configuration """
def __init__(self, target_directory, recursive_watch, remove_unoperate_file, meta_db_path, meta_reserve_d... |
a8eb18c93d8ac43d333fe46d30eb908e178dca4a | a9ede3d686d5047e2769d750a6af82d8b6f5b02e | /python/avi/migrationtools/avi_converter.py | e3299ea017724bd2a0bf20d86c8d0fecd1612807 | [] | no_license | grastogi23/sdk | 5ccdf3ad3e087d92d444cd2dbaffdee610b89173 | 690a1a14b292ab4463db5ad51589d29afa76192b | refs/heads/master | 2021-01-20T09:07:30.822772 | 2017-05-04T04:05:46 | 2017-05-04T04:05:46 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,493 | py | avi_converter.py | from avi.migrationtools.config_patch import ConfigPatch
from avi.migrationtools.vs_filter import filter_for_vs
from avi.migrationtools import avi_rest_lib
import yaml
import json
import logging
import os
LOG = logging.getLogger(__name__)
class AviConverter(object):
def init_logger_path(self):
pass
de... |
80d88d3fb088a3c691e7e10a1a02512046ac8730 | 6ae701d1f8b1068ac7ad7391c01e459e95f6fcd3 | /forkyfs.py | 40381085d0e062d8ef91c041b986fe11f0b50230 | [] | no_license | krushia/forkyfs-py | 43194521461b6fd0072b778ddda32aae3ed1b52b | 71570fe515fc51cd15ad27648355af852109efea | refs/heads/master | 2021-01-10T19:09:17.824224 | 2012-09-07T01:36:43 | 2012-09-07T01:36:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,205 | py | forkyfs.py | # forkyfs
import os
import shutil
class forkyfs:
def __init__(self):
self.basepath = '/home/krushia/forkfs-test/'
def listInstances(self, template, subdict=None):
tpath = template.lower() + "s/"
fullpath = self.basepath + tpath
results = os.listdir(fullpath)
if subdict is None:
return results
matchres... |
5709c461b18ab2df65a661d20b282527e5a7e8e7 | 3c0a99a83bb3cff66e1ac8640778824e091f0879 | /configs/aitod/v002.01.04_dota_faster_rcnn_r50_baseline_rtx3090.py | d2d74d7b80e17f85b321516d07eea8bf5f9cc39f | [
"Apache-2.0"
] | permissive | jwwangchn/mmdet-aitod | 1080e50f6e8543008dfd0c88c27be0340a8b106d | a4f1cad1f6ba079037a58edda885981654885b9e | refs/heads/main | 2023-05-18T21:35:06.345580 | 2021-06-08T08:14:39 | 2021-06-08T08:14:39 | 350,336,170 | 4 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,485 | py | v002.01.04_dota_faster_rcnn_r50_baseline_rtx3090.py | """
Faster R-CNN baseline
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = -1.000
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=3000 ] = 0.597
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=3000 ] = 0.372
Average Precision (AP) @[ IoU=0.50:0.95 | area= small... |
7eaa513a0c1ceeb7305c307d65b15a576d165ee4 | 1c8c30bc10549bfe98d05370f0c6db410e85a73f | /tests/test_response.py | ca96ce3fbd113766fcefdd0348f307d9568c371d | [] | no_license | rackerlabs/python-lavaclient | 033292afefc35e75af1cb797d9b05575983509ea | 6d8a44be247eaf878cdfab5f3493f4258906f318 | refs/heads/master | 2023-08-29T04:46:24.710640 | 2016-03-10T15:31:11 | 2016-03-10T15:31:11 | 35,032,950 | 5 | 8 | null | 2016-03-10T15:31:12 | 2015-05-04T12:16:35 | Python | UTF-8 | Python | false | false | 1,248 | py | test_response.py | import pytest
from datetime import datetime
from lavaclient.api import response
@pytest.fixture
def cluster_response(node_group, link_response):
return {
'id': 'cluster_id',
'name': 'cluster_name',
'created': '2014-01-01',
'updated': None,
'status': 'ACTIVE',
'stac... |
7b4ce984a60997da38bb45c78ff7ceca61c53249 | e96fa3b19b9459dd284da403969718f2b322ee91 | /main.py | a5e1dec97344f13d20a4a64264f881f09b0bcac5 | [] | no_license | dino-peric/Masters-Thesis-Object-Detection | 08df0d8183388a7782ba5fe5c8f8bb1e6af8da66 | 824c5d9a934e3ddd1d3affa791ae9a20960e8b5d | refs/heads/master | 2023-02-25T12:44:58.689738 | 2020-06-14T09:48:16 | 2020-06-14T09:48:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,688 | py | main.py | import os
import numpy as np
import matplotlib.pyplot as plt
import keras.metrics as metrics
from keras.models import load_model, Sequential
from keras.layers import Flatten, Dense
from keras.preprocessing.image import ImageDataGenerator
from keras.optimizers import SGD, Adam
from keras.applications.mobilenet_v2 impor... |
3ce03ffb1a94d67186423a52680e878c098b1fc3 | 3c7e4c41db4b0465f78e357c911df260bafd3f4f | /Python/67.二进制求和.py | 94a56eb0d4a794f510a0cf947ca8e252b601bdec | [] | no_license | geekjuruo/LeetCode | c099f96d7de0ace1876618c9248d2c7acf2fad43 | cb49af5663bd1f3390473dbe6974dffe4d36d078 | refs/heads/master | 2021-07-01T22:39:10.190988 | 2020-09-16T08:06:37 | 2020-09-16T08:06:37 | 166,734,748 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 245 | py | 67.二进制求和.py | #
# @lc app=leetcode.cn id=67 lang=python3
#
# [67] 二进制求和
#
# @lc code=start
class Solution:
def addBinary(self, a: str, b: str) -> str:
return '{0:b}'.format(int(a, 2) + int(b, 2))
# @lc code=end
|
1c44a7d29657a220715dbf6d7c8f4a7bb1fe6edb | 619954e31e3856f560ed4d4a99e47579bb59d708 | /test_fixture.py | d59fe1cc6a104c724ae762d811c123d609e6a092 | [] | no_license | 595216087/work | a6ecbde3adf90c97dd223d647c7f53d88ba4acba | 67bbdc936fe827516605578f7b2c9a4c9ed746d4 | refs/heads/main | 2023-04-04T04:49:03.797575 | 2021-04-20T13:50:07 | 2021-04-20T13:50:07 | 359,822,430 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 377 | py | test_fixture.py | import pytest
@pytest.fixture()
def myfixturn():
print("执行myfixture")
class Test_firstFile():
def test_one(self):
print("执行test one")
assert 2 + 3 == 5
def test_two(self, myfixture):
print("执行test two")
assert 2 + 3 == 5
def test_three(self):
print("... |
332c457ddf84b4cb04cfe7d7f1850651c18ba160 | d4239425234eacb647c4cc4f2f4c8537b618fca0 | /onadata/apps/logger/models/xform.py | e69b6a4af2493b57d60e48ce72e888a118b18fbe | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | onaio/onadata | 58762d6a606870bd13d43fd27fdaa61720a745c2 | e5bdec91cb47179172b515bbcb91701262ff3377 | refs/heads/main | 2023-09-04T03:12:43.388668 | 2023-08-24T07:27:08 | 2023-08-24T07:27:08 | 12,888,897 | 177 | 149 | NOASSERTION | 2023-09-13T14:19:05 | 2013-09-17T07:25:01 | Python | UTF-8 | Python | false | false | 46,522 | py | xform.py | # -*- coding: utf-8 -*-
"""
The XForm model
"""
# pylint: disable=too-many-lines
import hashlib
import json
import os
import re
from datetime import datetime
from xml.dom import Node
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.fields import GenericRe... |
c5fd3a7f2792bc23ab75321e57d6bd1fc6e5cd48 | c86966125a527ea2dc9671e1f51fb873345ba21f | /FileInfo/data/datadriven_backgrounds.py | 64d14957e5b2d82afa79ab07d1bc13aebaa8b394 | [] | no_license | kdlong/AnalysisDatasetManager | 37d06d79e788b2942b70ef0c1a486f0fc8818474 | 9feddffb07c36bccab9b55dc505c7df8181894aa | refs/heads/master | 2021-11-28T21:34:54.403541 | 2021-09-16T12:32:52 | 2021-09-16T12:32:52 | 44,493,711 | 0 | 12 | null | 2020-05-06T08:21:39 | 2015-10-18T19:51:29 | Python | UTF-8 | Python | false | false | 126 | py | datadriven_backgrounds.py | info = {
"DataEWKCorrected" : {
"luminosity" : 1,
},
"nonprompt" : {
"luminosity" : 1,
},
}
|
f87ffc66f929a8233e6e42dcf80bed26a82d9360 | e8fc06dfd8f5b2a72adc96a08ed4edc04ceb3737 | /main.py | b8d4693501c179444acebd1e0e5fcf3b9149645b | [] | no_license | shailaja183/VisualReasoning | 56b623aaf4c5ad05666b9b6076adc0670527029f | 01c00caf222582ec5d59d0f0e34a03ef67c31ab8 | refs/heads/master | 2020-03-18T02:11:26.882992 | 2018-08-24T00:33:47 | 2018-08-24T00:33:47 | 134,178,704 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,159 | py | main.py | # import necessary packages
from image_parser import ProcessedImage
from clingo_rules_generator import FactsRules
from query_parser import QueryParse
import argparse
import os
import random
import commands
import csv
class Main:
# initialization method - do nothing
def __init__(self):
pass
# shape detection me... |
70c7eb3365d623bb0ba1ecce57b151984b1ff17a | b9909b1e42b5d4cd354bca7cba5c1b458b2d5e66 | /generate_pickled_biharmonic_solutions.py | 16ab8bdbbfb2e47bbcfafa57e5de80d39abdd936 | [] | no_license | qTipTip/MasterThesisComputations | 5821a0e74c0ffbac886ab054f3ac91ae28eb1275 | 41cc5d015cf5d7b10d90ded0fa34429f032eab72 | refs/heads/master | 2021-05-02T08:49:32.395934 | 2018-02-08T22:06:20 | 2018-02-08T22:06:20 | 120,813,874 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 708 | py | generate_pickled_biharmonic_solutions.py | import pickle
import biharmonic
import PSFEM
import os
import sys
import shutil
"""
Computes solutions to the biharmonic equation and pickles them.
"""
n_values = map(int, sys.argv[1:])
for n in n_values:
filename = 'biharmonic_pickles/biharmonic_solution_{:04d}.p'.format(n)
if os.path.isfile(filename):
... |
f44bd0659bd8981c67ec3d4b79f9e837ac3e18bc | 681b3b0a0d29f7e39e8724f8c04e6b2b07f47587 | /geography/management/commands/migrate_geography_common.py | f02b81b9fd643082eb1f162f26ca12b3f6dc84f5 | [
"MIT"
] | permissive | SykoraErik/geography | d68b11750526e31ea022a9a4129168a38adf66fe | c16963f596ff99c6dc2a8ef6dfb8b98617269e62 | refs/heads/master | 2021-01-20T16:34:33.694102 | 2015-11-23T07:38:08 | 2015-11-23T07:38:08 | 44,530,773 | 0 | 0 | null | 2015-10-19T11:43:30 | 2015-10-19T11:43:30 | null | UTF-8 | Python | false | false | 2,138 | py | migrate_geography_common.py | from django.core.management.base import BaseCommand
from django.core.management import call_command
from optparse import make_option
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option(
'--geography-database',
dest='geography_database',
ty... |
fe2e8b9d7e7f0f9894201e03b299e77d00a52048 | 6f31a15cb73175084f2c4485d3dea0b8975b2ec9 | /idlak-server/app/reqlogging.py | 232a82d5aea3960d424d3b6a16133565c2cd8995 | [
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | Idlak/idlak | c7cd5e6c0b02918cda85dbb2fb5c7333a789c304 | 4be6f7d951ba0d707a84a2cf8cbfc36689b85a3c | refs/heads/master | 2021-11-23T13:28:43.709163 | 2021-11-01T15:51:46 | 2021-11-01T15:51:46 | 127,285,931 | 65 | 26 | NOASSERTION | 2021-11-01T15:51:47 | 2018-03-29T12:06:52 | Shell | UTF-8 | Python | false | false | 2,400 | py | reqlogging.py | import copy
from app import db
from datetime import datetime
from flask import current_app
from flask_restful import request
app = db.app
@current_app.before_request
def before():
""" Handling logging before request is processed """
current_app.logger.info("Local Timestamp: {}".format(str(datetime.now())))
... |
6aa0c712c05b88eba192e6722f7909893edd67d8 | 7c82b6eb190fa96dc6486ce3c770d47279380066 | /catalogues/migrations/0026_auto_20220413_0827.py | a7519b8fc2f3aa0088177fbfa1fc0c5126781434 | [] | no_license | Mediate18/Mediate | 8b34cda12c23947aeac644248672da4de272cb22 | 47eb0f0fbba8b87c69acb97bcf3d39e7a037dbc8 | refs/heads/main | 2023-07-25T22:27:23.138626 | 2023-07-17T12:31:37 | 2023-07-17T12:31:37 | 117,852,218 | 5 | 0 | null | 2023-03-29T11:53:17 | 2018-01-17T15:08:35 | Python | UTF-8 | Python | false | false | 4,436 | py | 0026_auto_20220413_0827.py | # Generated by Django 2.2.27 on 2022-04-13 08:27
from django.conf import settings
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('persons', '0016_auto_20220411_1225'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('transcriptions',... |
36d3a91261df0a809bfd9bda23c7f63442196630 | b0951b5d0fcca16d658c56ed96060d9372f7104f | /indra/preassembler/custom_preassembly.py | 3a56c34a1fe63f335e3e9c18218deecf5f550bcd | [
"BSD-2-Clause",
"BSD-2-Clause-Views"
] | permissive | ddomingof/indra | b207587ba655d0f276422ebc2d83f54a19136a46 | 0643b2de1211b269a005ac1a87d93834cabb7849 | refs/heads/master | 2023-06-22T20:59:47.792163 | 2021-07-23T04:28:32 | 2021-07-23T04:28:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,296 | py | custom_preassembly.py | """This module contains a library of functions that are
useful for building custom preassembly logic for some applications.
They are typically used as matches_fun or refinement_fun arguments
to the Preassembler and other modules."""
from indra.statements import *
from indra.pipeline import register_pipeline
@register... |
5781e595ac5ded552ecc321f0a4585a86b26914d | d97b1822d5ad84f32491a99ffdf77b9bcd061018 | /automated_hough.py | 60dc7a9b78377dccefa7e0ac877f94dde0e0e0a4 | [] | no_license | mohsen-gis/StemDetection | 363d8d990c7fd21f2b1b2bc582e136ca8273bd0d | c11ebb25a0d19da0a2f9fbf98c0c2ef9dd6c25a5 | refs/heads/main | 2023-04-29T13:20:43.404804 | 2021-05-09T19:06:59 | 2021-05-09T19:06:59 | 364,073,860 | 0 | 0 | null | 2021-05-09T21:54:18 | 2021-05-03T22:10:23 | Python | UTF-8 | Python | false | false | 4,011 | py | automated_hough.py | #Final
import numpy as np
import cv2 as cv
from matplotlib.pyplot import figure
import matplotlib.pyplot as plt
import os
import os.path
def highpass(img, sigma):
return img - cv.GaussianBlur(img, (0,0), sigma) + 127
def unsharp_mask(impath, kernel_size=(5, 5), sigma=1.0, amount=1.0, threshold=0):
"""Retur... |
b328af29c85cb424ae707f5bb72b7bc382d61cb5 | d6edd195086e07c43edd955871f2ab671b60e82b | /FakeNewsDetector/fonctions/data.py | 005c563048f1d68797e525b5a80903a05fa54f81 | [] | no_license | Benjamin-coder1/Fake_news_detector | 9e9be58ae8c1a841eb146aa48861ff0fa6488fb3 | 354cbe074c4e4d4300ac883634c78cc59bd542db | refs/heads/master | 2022-07-21T19:04:55.268775 | 2020-05-21T22:12:00 | 2020-05-21T22:12:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,312 | py | data.py |
import requests
import fonctions.error as e
import fonctions.color as c
class Recherche_NewAPI :
"""
DESCRIPTION
this class allows to make research on NewAPI thank to an url or a title
PARAMETERS
param1 : list of str
list of keys words for research
param2 : list of ... |
b240deada30cc8f54968d51d098a301cfffe1594 | f0683555b324e15dcb0cdea8512cb62784c307a6 | /jay/video/views.py | fe01df19149ec4ddb3103273023b12c68e5da23a | [] | no_license | 10314128/jay | 5ba551f75b332d6be773d4b2f6d3ecfe5af11d05 | 43d725be431fbcc823942f76531eed765e937934 | refs/heads/master | 2016-09-01T16:32:02.599577 | 2016-01-08T05:14:23 | 2016-01-08T05:14:23 | 49,054,860 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 103 | py | views.py | from django.shortcuts import render
def video(request):
return render(request, 'video/video.html') |
96a281ef46bcac83d9eb9efd9a7143097a91c008 | 83216a02db95855a10a9d2ac4e458a14e2676773 | /services/forms.py | 250da0ff032f3b5cb355aa058f3ceab466f4eccb | [] | no_license | Saherahmad96/Personal_Portfolio | 3f6094cdfb98970f6406406cbe5a4bb0f34cc5e8 | a9e77bfa32dc98e50ceec81f588b92ee363bc3ce | refs/heads/master | 2022-12-09T22:30:44.028217 | 2020-03-29T21:10:41 | 2020-03-29T21:10:41 | 237,105,373 | 0 | 0 | null | 2022-12-08T03:55:31 | 2020-01-29T23:48:42 | HTML | UTF-8 | Python | false | false | 610 | py | forms.py | from flask_wtf import FlaskForm
from wtforms import SelectField, SubmitField
# EXAMPLE | Api Route for Getting the weather data
@dashboard.route('/altGetWeatherData', methods=['GET'])
def altGetWeatherData():
url = "https://api.darksky.net/forecast/6f5d06c8550c54d468601ad72af413fd/33.9052,-84.0084"
# Does a GET re... |
5e5e00de1de40ffabb1d73d2eae2e7566ba3779a | 5b8ca7feda52551cb90644c775f6e5bb9dcb8e4b | /mastrms/mastrms/mdatasync_client/client/testapp.py | aae4a3c51bea0a69c75b87b10c39730cc66f6d5d | [] | no_license | google-code-export/mastr-ms | f6c25b31109452a12b07fd632f341729e36ab31b | 80de6c35098c3af4c6a1a21814e838be734389ed | refs/heads/master | 2021-01-02T06:31:56.070711 | 2013-04-16T07:28:18 | 2013-04-16T07:28:18 | 32,134,956 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,509 | py | testapp.py | #test app
import time
import wx
import string
ID_ICON_TIMER = wx.NewId()
class IconBar:
numIcons = 5
##
# \brief the constructor default left: red, default right: green
#
def __init__(self,l_off=[128,0,0],l_on=[255,0,0],r_off=[0,128,0],r_on=[0,255,0]):
self.s_line = "\xff\xff\xff"+"\0"*45... |
1b09061e26e29bf7886a9da1a381f78c0f6c664b | 5078c7c4eff3ddd0c962bd3afa27afb089d2fa7b | /Chapter_11/test_survey.py | b220c6e03829951863215f765e3721d41319d3b6 | [] | no_license | alimukhammad/Python_Crash_Course | 7a0670b39d7cfb0ca53d2e330769fe9f8a551344 | 916ce3facffffb60c5ac187bf735a1fc5403388f | refs/heads/main | 2023-03-30T15:23:30.226920 | 2021-04-06T03:58:05 | 2021-04-06T03:58:05 | 332,722,573 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,195 | py | test_survey.py | import unittest
from survey import AnonemousSurvay
class TestAnonemousSurvay(unittest.TestCase):
# Test for the class AnonemousSurvay
def setUp(self):
# Create a survey and a set of responses for use in all test methods
question = "What language did you first learn to speak?"
... |
48d088b85f3e8ba93edc348d5b78729932042562 | 65b6d9aa730fd5df09117082bfd31cd6ffa415aa | /server.py | db54567d0dcd65d042641ce2c24b750917d677e0 | [] | no_license | yoavram/volver | 5411f464fb0bef985f15731b9910ecf0d225dd6a | c22def197c6168741c4245bf6718d3c0b3709628 | refs/heads/master | 2020-05-17T18:01:41.328198 | 2014-05-19T06:04:21 | 2014-05-19T06:04:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,775 | py | server.py | # -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from flask import Flask, request, render_template, redirect, Response, url_for
import os
from flask.ext.pymongo import PyMongo, ObjectId, ASCENDING
from flaskext.markdown import Markdown
from flask.ext.assets import Environment, Bundle
from... |
67b7022373e1aef87298203a51a2587edd010d69 | 30a56531ae8bae208cc7efe57d93548541299288 | /environment/migrations/0003_response.py | 765c79683760ad65ca60bf048ae2f2455fde0238 | [] | no_license | kiptoo-rotich/pollution | b07d6ec557ee4e842d73db6cb98880b4c059cb9e | ab23ece19596c69db23220af263c8ce4a92a89b5 | refs/heads/master | 2023-06-25T09:19:19.213447 | 2021-07-28T22:03:21 | 2021-07-28T22:03:21 | 390,518,761 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 728 | py | 0003_response.py | # Generated by Django 3.2.5 on 2021-07-27 22:09
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('environment', '0002_cleanup'),
]
operations = [
migrations.CreateModel(
name='Response',
... |
c7418c3252774160b5d61e102fc014825e2f371e | 85a9ffeccb64f6159adbd164ff98edf4ac315e33 | /pysnmp-with-texts/EdgeSwitch-ROUTING-MIB.py | 2834d08dcac61e457b97ff7f8c124cc1e35a9b21 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | agustinhenze/mibs.snmplabs.com | 5d7d5d4da84424c5f5a1ed2752f5043ae00019fb | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | refs/heads/master | 2020-12-26T12:41:41.132395 | 2019-08-16T15:51:41 | 2019-08-16T15:53:57 | 237,512,469 | 0 | 0 | Apache-2.0 | 2020-01-31T20:41:36 | 2020-01-31T20:41:35 | null | UTF-8 | Python | false | false | 154,529 | py | EdgeSwitch-ROUTING-MIB.py | #
# PySNMP MIB module EdgeSwitch-ROUTING-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EdgeSwitch-ROUTING-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:10:55 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (d... |