Skip to content

Instantly share code, notes, and snippets.

@pgtwitter
pgtwitter / .py
Last active April 5, 2022 09:06
状態フィードバック
# %%
import matplotlib.pyplot as plt
import matplotlib.patches as p
from scipy import signal
import sympy
sympy.init_printing(use_latex='png')
def sys2expandExpr(sys):
num, den = sympy.fraction(sympy.simplify(sys))
@nrm176
nrm176 / edinet_api.py
Created March 18, 2019 08:39
New EDINET API
import requests, zipfile, io
HEADERS = {
'User-Agent': 'My Sample Edinet API app',
}
def getDocumentList():
# 書式一覧API
# GET https://disclosure.edinet-fsa.go.jp/api/v1/documents.json
@p2or
p2or / Blender_Basic-UI-Template.py
Last active September 23, 2024 15:48
Basic-UI-Template (Blender 3+) for https://blender.stackexchange.com/a/57332 #Blender
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@bellbind
bellbind / index.html
Last active April 10, 2018 08:21
[javascript][tensorflowjs] train XOR function with tensorflow.js
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
<script src="script.js" defer="defer"></script>
</head>
<body></body>
</html>
@p2or
p2or / Blender_Basic-UI-Template_27.py
Last active January 22, 2024 19:03
Basic-UI-Template for Blender 2.7+ #Blender #BSE
# -> For a Blender 2.8+ version, go to https://gist.github.com/p2or/2947b1aa89141caae182526a8fc2bc5a
# https://blender.stackexchange.com/q/57306/3710, https://blender.stackexchange.com/q/79779/3710
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
@think49
think49 / eval-calculation-1.0.0.js
Last active October 18, 2023 15:04
eval-calculation.js: 計算式の文字列を評価する
/**
* eval-calculation.js
* evaluate calculation formula.
*
* @version 1.0.0
* @author think49
* @url https://gist.github.com/think49/54b074cab2145efddb48765652c74710
* @license http://www.opensource.org/licenses/mit-license.php (The MIT License)
*/
@zach-m
zach-m / Jetty 9 + Weld 2 + Jersey 2 + Jackson 2 + Maven
Last active July 1, 2023 20:25
Jetty 9 + Weld 2 + Jersey 2 + Jackson 2 + Maven
This is a template for creating and running a Jetty web application, using Jersey + Jackson for REST, and Weld for CDI.
It is organized as a maven project, which builds a WAR file deployable to a standalone Jetty server.
The Jetty maven plugin - which is more suitable for development time - is also configured in the pom.xml.
Comments:
* As Jetty is a servlet-3.0 compatible container, no configuration is needed in web.xml
* Due to a bug in maven, it's required to use version 3.2.2 or above
* The JaxRs API classes are to be placed at the package - or below - the one where 'RestConfig.java' is
* When using in standalone Jetty installation, enable the 'cdi' module before deploying
>> java -jar start.jar --add-to-startd=cdi
@shunsuke0125
shunsuke0125 / HttpRequestDelegate.h
Last active December 15, 2024 02:01
【Objective-C】HTTPリクエストサンプル
#import <Foundation/Foundation.h>
#define TIMEOUT_INTERVAL 10
@interface HttpRequestDelegate : NSObject<NSURLConnectionDelegate> {
NSURLConnection *connection;
NSMutableData *receivedData;
NSURLResponse *responseData;
BOOL synchronousOperationComplete;
}